-
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: Ubuntu 16
-
Poetry version: 1.1.1
Issue
I have multiple versions of python3 on my system and I use update-alternatives to choose where python3 points to.
I specify the desired python version for each project in the pyproject file as follows:
[tool.poetry.dependencies]
python = "==3.5.2"
So in this case I enforce version 3.5.2. The problem is that poetry creates a symlink to python3 and not python3.5, which works fine until I change the default python version:
$ tree .venv/bin
.venv/bin
├── activate
├── activate.csh
├── activate.fish
.
.
├── python -> /usr/bin/python3
├── python3 -> python
├── python3.5 -> python
.
.If I specifically tell poetry to use python3.5, it creates the correct symlink:
EDIT: This is only true if the default version of python is not the one specified in the pyprojet. That means that, in this case, if the default version of python3 is 3.5, the following commands produce the same output as the previous ones.
$ poetry env use python3.5
$ poetry install
$ tree .venv/bin
.venv/bin
├── activate
├── activate.csh
├── activate.fish
.
.
├── python -> /usr/bin/python3.5
├── python3 -> python
├── python3.5 -> python
.
.
This is a huge problem for me since the python version should be enforced very strictly. I have taken a look at how pipenv handles this and it creates the symlink to the specific python version and not just plain python3.
I also don't see any reference to the python version in the lockfile. Is this normal?
Thanks!