-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: Windows 10 20H2
- Poetry version: 1.1.9
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
[tox]
requires = tox-conda
envlist = debug
[testenv]
[testenv:debug]
deps =
poetry == 1.1.8
commands =
python -m poetry env info
Produces something like:
debug run-test: commands[0] | python -m poetry env info
Virtualenv
Python: 3.7.11
Implementation: CPython
Path: C:\path\to\project\.tox\debug
Valid: True
Whereas
[tox]
requires = tox-conda
envlist = debug
[testenv]
[testenv:debug]
deps =
poetry == 1.1.9
commands =
python -m poetry env info
Leads to a broken environment (in the eyes of poetry):
debug run-test: commands[0] | python -m poetry env info
Virtualenv
Python: 3.7.11
Implementation: CPython
Path: C:\path\to\project\.tox\debug
Valid: False
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.