運(yùn)行
poetry install
時(shí)報(bào)錯(cuò)如下:
Installing dependencies from lock file No dependencies to install or update Installing the current project: backend (0.1.0) Warning: The current project could not be installed: No file/folder found for package backend If you do not want to install the current project use --no-root. If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file. In a future version of Poetry this warning will become an error!
解決方案:
poetry install --no-root
如果在運(yùn)行上面代碼提示
poetry install --no-root Installing dependencies from lock file No dependencies to install or update
可以嘗試刪除.lock文件后重新運(yùn)行
我是在安裝https://github.com/abi/screenshot-to-code項(xiàng)目時(shí)遇到的
刪除
\screenshot-to-code\backend\poetry.lock
后,再次運(yùn)行結(jié)果如下
poetry install --no-root Updating dependencies Resolving dependencies... (32.7s) Package operations: 0 installs, 12 updates, 0 removals - Updating idna (3.6 -> 3.7) - Updating filelock (3.13.1 -> 3.13.4) - Updating fsspec (2024.2.0 -> 2024.3.1) - Updating typing-extensions (4.10.0 -> 4.11.0) - Updating httpcore (1.0.4 -> 1.0.5) - Updating huggingface-hub (0.21.4 -> 0.22.2) - Updating pillow (10.2.0 -> 10.3.0) - Updating setuptools (69.2.0 -> 69.5.1) - Updating pydantic (1.10.14 -> 1.10.15) - Updating openai (1.14.0 -> 1.17.1) - Updating pre-commit (3.6.2 -> 3.7.0) - Updating pyright (1.1.354 -> 1.1.358) Writing lock file