Skip to content

Instantly share code, notes, and snippets.

@iserko
Last active January 22, 2021 20:04
Show Gist options
  • Save iserko/1e88e05675e360b23d52bac65c3baced to your computer and use it in GitHub Desktop.
Save iserko/1e88e05675e360b23d52bac65c3baced to your computer and use it in GitHub Desktop.
Poetry issues with different versions
~/testproject-36 % pyenv local
3.6.12
~/testproject-36 % which python
/home/igor/.pyenv/shims/python
~/testproject-36 % poetry env info
Virtualenv
Python: 3.9.1
Implementation: CPython
Path: NA
System
Platform: linux
OS: posix
Python: /home/linuxbrew/.linuxbrew/opt/[email protected]
~/testproject-36 % poetry -V
Poetry version 1.1.4
~/testproject-36 % poetry init
This command will guide you through creating your pyproject.toml config.
Package name [testproject-36]:
Version [0.1.0]:
Description []:
Author [Info <[email protected]>, n to skip]: n
License []:
Compatible Python versions [^3.9]: 3.6.*
Would you like to define your main dependencies interactively? (yes/no) [yes] no
Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file
[tool.poetry]
name = "testproject-36"
version = "0.1.0"
description = ""
authors = ["Info <[email protected]>"]
[tool.poetry.dependencies]
python = "3.6.*"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Do you confirm generation? (yes/no) [yes] yes
~/testproject-36 % python -V
Python 3.6.12
~/testproject-36 % poetry install
The currently activated Python version 3.9.1 is not supported by the project (3.6.*).
Trying to find and use a compatible version.
Using python3 (3.6.12)
Creating virtualenv testproject-36-1DiruTHV-py3.6 in /home/igor/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
~/testproject-36 % poetry run python -V
The currently activated Python version 3.9.1 is not supported by the project (3.6.*).
Trying to find and use a compatible version.
Using python3 (3.6.12)
Python 3.9.1
~/testproject-36 % ~/.cache/pypoetry/virtualenvs/testproject-36-1DiruTHV-py3.6/bin/python -V
Python 3.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment