Open doyaklee opened 1 month ago
poetry config virtualenvs.create false
Don't do that
poetry config virtualenvs.create false
Don't do that
What I want to do is to install dependencies into the system environment, and as I understand, this is what exactly virtualenvs.create false
intended as written in the documentation. So, I can't understand why I shouldn't do that
If set to false, Poetry will not create a new virtual environment. If it detects an already enabled virtual environment or an existing one in {cache-dir}/virtualenvs or {project-dir}/.venv it will install dependencies into them, otherwise it will install dependencies into the systems python environment.
What I want to do is to install dependencies into the system environment
No, you don't want to do that.
If you insist on pursuing this, you can check how poetry determines the "system" environment here, and figure out what it is doing. I guess it is using the-python-that-poetry-itself-was-installed-with.
But I highly recommend just not doing what you are doing.
Description
Hello. I'd like to use
poetry
to manage python packages for global python environment set bypyenv
in Windows. So, I first install and set python 3.12.5 usingpyenv
Then, in the arbitrary folder containing
pyproject.toml
file withpython = 3.12.5
in it, I install python packages with following commandsSo far, it worked fine globally.
Problems happened when I tried to switch my global environment to 3.13.0rc1. I try to do the same thing, but it seems that
poetry install
stuck to previous 3.12.5 version even thoughpython
points to 3.13.0rc1How could I utilize
poetry
to manage global python package management withpyenv
? Please give me some hints. Thanks!Workarounds
pyenv uninstall 3.12.5
poetry install
Poetry Installation Method
install.python-poetry.org
Operating System
Windows 10
Poetry Version
1.8.3
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs