Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry uses incorrect Python #1470

Closed
3 tasks done
pikeas opened this issue Oct 17, 2019 · 2 comments
Closed
3 tasks done

Poetry uses incorrect Python #1470

pikeas opened this issue Oct 17, 2019 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@pikeas
Copy link

pikeas commented Oct 17, 2019

  • 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: MacOS 10.15

  • Poetry version: 1.0.0b2

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/pikeas/5c45fc9fd32353b5aee37163f95ef14d

Issue

Possibly related: #439 (comment), #536, #988, #1386.

$ python -V
3.7.4
$ poetry install -vvv

[RuntimeError]
The current Python version (3.8.0) is not supported by the project (~3.7)
Please activate a compatible Python version.

Traceback (most recent call last):
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/clikit/console_application.py", line 132, in run
    status_code = command.handle(parsed_args, io)
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/clikit/api/command/command.py", line 165, in _do_handle
    self._dispatcher.dispatch(ConsoleEvents.PRE_HANDLE.value, event)
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/clikit/api/event/event_dispatcher.py", line 22, in dispatch
    self._do_dispatch(listeners, event_name, event)
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/clikit/api/event/event_dispatcher.py", line 89, in _do_dispatch
    listener(event, event_name, self)
  File "/Users/pikeas/.local/pipx/venvs/poetry==1.0.0.b2/lib/python3.8/site-packages/poetry/console/config/application_config.py", line 84, in set_env
    raise RuntimeError(

Poetry is installed under Python 3.8, the currently activated Python is 3.7, and pyproject.toml has Python pinned to ~3.7 (rather than the more common ^3.7).

I expected Poetry to use the active version of Python, instead it uses the version of Python it was installed under, which fails.

@pikeas pikeas added the kind/bug Something isn't working as expected label Oct 17, 2019
@sdispater
Copy link
Member

Duplicate of #536 which is currently being fixed.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants