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.

The specified Python version (3.8) is not supported by the project (^3.7).

See original GitHub issue
  • 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 (-vvv option).

  • OS version and name: Ubuntu 18.04.3 LTS

  • Poetry version: Poetry version 1.0.0

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/jobevers/a3e674e4f316a6c0ea535ac818bf5f61

Issue

I wanted to start using python 3.8 in a project:

» poetry env use -vvv 3.8.0 

[NoCompatiblePythonVersionFound]
The specified Python version (3.8) is not supported by the project (^3.7).
Please choose a compatible version or loosen the python constraint specified in the pyproject.toml file.

Traceback (most recent call last):
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/console/commands/env/use.py", line 23, in handle
    env = manager.activate(self.argument('python'), self._io)
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/utils/env.py", line 259, in activate
    self.create_venv(io, executable=python, force=create)
  File "/home/jobevers/.local/pipx/venvs/poetry/lib/python3.6/site-packages/poetry/utils/env.py", line 520, in create_venv
    self._poetry.package.python_versions, python_minor

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

28reactions
kamyarcommented, Jun 5, 2020

+1 having this issue at the moment with python 3.8.2.

Edit: changing

[tool.poetry.dependencies]
python = "3.8"

to

[tool.poetry.dependencies]
python = "^3.8"

worked.

I guess initially set it too strictly without knowing

28reactions
sdispatercommented, Dec 13, 2019

You should use only the minor version with env use:

poetry env use 3.8

Basically, Poetry looks for a python3.8.0 executable which it does not find leading to this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry doesn't use the correct version of Python - Stack Overflow
The currently activated Python version 2.7.16 is not supported by the project (^3.8). Trying to find and use a compatible version.
Read more >
Select python interpreter in poetry | by Jamie Thomson - Medium
The currently activated Python version 3.8.2 is not supported by the project (3.9, <3.10). Trying to find and use a compatible version.
Read more >
What's New In Python 3.9 — Python 3.11.1 documentation
This article explains the new features in Python 3.9, compared to 3.8. ... Python projects maintainers to organize the removal of the Python...
Read more >
Managing environments | Documentation - Poetry
However, for various reasons, this Python version might not be compatible with the python requirement of the project. In this case, Poetry will...
Read more >
Chapter 38. Installing and using Python Red Hat Enterprise ...
You can install Python 3.8 and Python 3.9, including packages built for either version, in parallel with Python 3.6 on the same system,...
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