question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 10 months ago
  • Reactions:1
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shanewazabbascommented, Nov 22, 2022

Reread everything I posted. I cannot make it any more clear…

1reaction
shanewazabbascommented, Nov 22, 2022

I have and it still doesn’t work…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found