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 use pypy3` switches to a Python 3.6 venv if it already exists

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).

Issue

When I try to switch my environment to PyPy3 using poetry use pypy3 but have previously typed poetry use 3.6 poetry switches to the CPython 3.6 virtualenv instead of creating a new virtualenv for pypy3. You can reproduce this by doing the following:

$ poetry env use 3.6
Using virtualenv: /home/thedrow/.cache/pypoetry/virtualenvs/jumpstarter-H8PwDp0q-py3.6
$ poetry env use pypy3
Using virtualenv: /home/thedrow/.cache/pypoetry/virtualenvs/jumpstarter-H8PwDp0q-py3.6
$ poetry run which pypy3
/home/thedrow/.pyenv/shims/pypy3 # should be the virtualenv's pypy

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thedrowcommented, Feb 26, 2020

Just include the platform if it’s not CPython in the virtualenv’s name.

0reactions
PetterScommented, May 10, 2020

With some more time that PR now seems to work, at least with my installation of pypy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry doesn't use the correct version of Python
To change the specific version poetry is using you should use poetry env ... (e.g. python = ">=3.6.2 <3.7" ) after creating the...
Read more >
Release History
If a "venv" install scheme exists in sysconfig , virtualenv now uses it to create new virtual environments. · The activated virtualenv prompt...
Read more >
My Python Development Environment, 2020 Edition
I need to develop against multiple Python versions - various Python 3 versions (3.6, 3.7, 3.8, mostly), PyPy, and occasionally Python 2.7 (less ......
Read more >
Pyenv: your Linux / Unix tool to manage different python ...
Pyenv is a unix / linux tool which help you install and manage different python versions with ease (python, pypy, anaconda, etc.
Read more >
virtualenv -> venv Code Example
virtualenv -p python3 . ... virtual -p venv . python3 virtual environments · python3.9 -m venv virtualenv · python3 virutalenv · using a...
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