You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'd like to use poetry to manage python packages for global python environment set by pyenv in Windows.
So, I first install and set python 3.12.5 using pyenv
> pyenv install 3.12.5> pyenv global 3.12.5
Then, in the arbitrary folder containing pyproject.toml file with python = 3.12.5 in it, I install python packages with following commands
So 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 though python points to 3.13.0rc1
> pyenv install 3.13.0rc1
> pyenv global 3.13.0rc1
> poetry install
## Skipping virtualenv creation, as specified in config file.## Installing dependencies from lock file#### No dependencies to install or update> python # leads to python3.13.0rc1
How could I utilize poetry to manage global python package management with pyenv? Please give me some hints.
Thanks!
Workarounds
delete the previous pyenv version using pyenv uninstall 3.12.5
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.
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 using
pyenv
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
It's not failed.
The text was updated successfully, but these errors were encountered: