-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry after 1.1.9 fails to recognize conda environments as valid #4566
Comments
I'm also having the same issue. Tested poetry 1.1.9 through 1.1.11 (latest). My setup is the following:
pyproject.toml:
First, I executed
I got the same result with poetry versions 1.1.9 through 1.1.11. UPDATE: OP was right about the missing
TL;DR: poetry >=1.1.9 doesn't work with conda environments, and cannot install packages into them as it expects python.exe to reside in the enviroment's scripts folder. |
Same thing here, tried to install with 1.1.11 and when I import my lib in a python shell I get error on imports of libs such as Pandas which obviously are in my pyproject.toml |
I also experienced this problem. I created a new conda environment, activate it, and installed poetry in it with From time to time (for example with
For example, I installed uvicorn ( Do we have any progress with this issue? |
Issue persists in new release 1.1.12. |
So the only workaround is: "With symlinks for python.exe and python39.dll in the conda environment's scripts folder, poetry works without issues", as it is stated above? |
Windows is the indicated OS in both the OP's and my posts. In fact, the only time I briefly tried miniconda + poetry on Ubuntu 20.04, there were no such issues. On Windows, symbolic links work for me - of course, it's not optimal that for each environment they need to be created manually. |
Thanks |
OMG, |
I've prepared more or less proof-of-concept PR's. Please be so kind to test it: Poetry 1.1: #5008 You can easily install it using pipx, e.g.:
And then run by using |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
Since poetry version 1.1.9 poetry does not recognize valid virtual environments created by conda.
We use conda (via tox-conda) to test our libraries with different versions of python (since we're in a corporate network disconnected from the internet we have to rely on repositories for the python interpreters). Minimal tox example to reproduce the problem:
tox.ini
Produces something like:
Whereas
Leads to a broken environment (in the eyes of poetry):
We think this is because
conda create
does not put the python executables inside the Scripts directory like virtualenv does. Instead, they are placed in the root directory of the virtualenv folder.If we understood #4507 right, poetry 1.1.9 expects all binaries in the Scripts (or bin) Directory of the virtualenv directory.
The text was updated successfully, but these errors were encountered: