[x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
OS version and name: macOS 10.14.6
I have the following pyenv setup:
โฏ pyenv versions
system
* 2.7.17 (set by /Users/taran_lu/.pyenv/version)
* 3.7.7 (set by /Users/taran_lu/.pyenv/version)
3.8.3
Globally, python is set to Python 2.7.17 installed via pyenv and python3 is set to Python 3.7.7 also via pyenv. In the previous version of poetry, when I would run poetry install in a project that was Python 3 only, poetry would detect that current version of Python did not match the requirements, after which, it would search and find the pyenv version of Python 3 and use that successfully.
After updating to 1.0.10, poetry install now fails with the following error:
โฏ poetry install
The currently activated Python version 2.7.17 is not supported by the project (^3.7,<3.9).
Trying to find and use a compatible version.
Using python3 (3.7.7)
Creating virtualenv --- in /---/.venv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'PosixPath' is not defined
Installing dependencies from lock file
[SolverProblemError]
The current project's Python requirement (2.7.17) is not compatible with some of the required packages Python requirement:
- pygments requires Python >=3.5
Because no versions of bpython match >0.19,<0.20
and bpython (0.19) depends on pygments (*), bpython (>=0.19,<0.20) requires pygments (*).
Because pygments (2.6.1) requires Python >=3.5
and no versions of pygments match !=2.6.1, pygments is forbidden.
Thus, bpython is forbidden.
So, because --- depends on bpython (^0.19), version solving failed.
Somehow, it seems to be getting confused about the project's requirements.
Workaround: install poetry < 1.0.10
@smalllark Yeah, that is what I have ended up doing for now.
Also, latest beta fixes it
```
$ poetry -V
Poetry version 1.0.10
$ poetry self update --preview
/my_personal_dir/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
"program uses threads.", RuntimeWarning)
Updating to 1.1.0b2
Poetry (1.1.0b2) is installed now. Great!
$ poetry -V
Poetry version 1.1.0b2
$ poetry env use 3.7
Creating virtualenv lala-9oGnfBL0-py3.7 in /my_personal_dir/.cache/pypoetry/virtualenvs
Using virtualenv: /my_personal_dir/.cache/pypoetry/virtualenvs/lala-9oGnfBL0-py3.7
$ poetry install
Installing dependencies from lock file
Package operations: 42 installs, 0 updates, 0 removals
``
@taranlu-houzz possibly resolved with the release of 1.1.0?
Most helpful comment
Also, latest beta fixes it
```
$ poetry -V
Poetry version 1.0.10
$ poetry self update --preview
/my_personal_dir/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
"program uses threads.", RuntimeWarning)
Updating to 1.1.0b2
Poetry (1.1.0b2) is installed now. Great!
$ poetry -V
Poetry version 1.1.0b2
$ poetry env use 3.7
Creating virtualenv lala-9oGnfBL0-py3.7 in /my_personal_dir/.cache/pypoetry/virtualenvs
Using virtualenv: /my_personal_dir/.cache/pypoetry/virtualenvs/lala-9oGnfBL0-py3.7
$ poetry install
Installing dependencies from lock file
Package operations: 42 installs, 0 updates, 0 removals
``