Poetry not using the correct python version
See original GitHub issue> poetry shell
The currently activated Python version 3.9.14 is not supported by the project (>=3.10.1,<3.11).
Trying to find and use a compatible version.
Using python3 (3.10.7)
Skipping virtualenv creation, as specified in config file.
Spawning shell within /Users/shaneabbas/.pyenv/versions/3.9.14
It says using 3.10.7 but the last line says otherwise. If I do poetry install, it chooses to still use 3.9.14
Keep in mind that I’m using pyenv and local .python-version file
> python --version
Python 3.10.7
> cat .python-version
3.10.7
> poetry env info
Virtualenv
Python: 3.9.14
Implementation: CPython
Path: NA
Executable: NA
System
Platform: darwin
OS: posix
Python: 3.9.14
Path: /Users/shaneabbas/.pyenv/versions/3.9.14
Executable: /Users/shaneabbas/.pyenv/versions/3.9.14/bin/python3.9
There is nothing crazy going on here on my end. How are we not able to handle just having the current python version be respected for poetry? I’m on a mac
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Poetry using the wrong Python version (not related to pyenv)
Poetry should implicitly create a built-in virtual environment with the Python version specified by the tool.poetry.dependencies.python property ...
Read more >Poetry doesn't use the correct version of Python - Stack Overflow
Delete the original one: run poetry env remove myApp-XkghI9p6-py3.6 · Run any poetry step, to create it, or run poetry shell , and...
Read more >Managing environments | Documentation - Poetry
By default, Poetry will try to use the Python version used during Poetry's installation to create the virtual environment for the current project....
Read more >How to Set Up Python and Poetry
If another developer runs poetry install , this file makes sure that the correct versions are used. You can then run your project...
Read more >Poetry doens't use chosen python version - Render community
I'm trying to use Django 4.1.1 and Python 3.10.6. I specified PYTHON_VERSION environment variable to 3.10.6, but Poetry tries to use 3.7.10 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Reread everything I posted. I cannot make it any more clear…
I have and it still doesn’t work…