Poetry: ensurepip fails when using pypy3.6

Created on 30 Apr 2019  路  6Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS name and version: Arch Linux 5.0.9
  • Poetry version: 1.0.0a2

Issue

Setting up the environment with pypy7.1.0-beta0 (3.6.1 support) fails when ensurepip is run. I've listed the steps below:

$ cd project
$ pyenv local pypy3.6-7.1.0
$ pypy3.6 -m pip install --upgrade pip setuptools --user
$ poetry env use pypy3.6 -vvv
Creating virtualenv project-jhaNgXsO-py3.6 in /home/sinisa/.virtualenvs
Traceback (most recent call last):
  File "<stdin>", line 14, in <module>
  File "/home/sinisa/.pyenv/versions/pypy3.6-7.1.0/lib-python/3/venv/__init__.py", line 67, in create
    self._setup_pip(context)
  File "/home/sinisa/.pyenv/versions/pypy3.6-7.1.0/lib-python/3/venv/__init__.py", line 272, in _setup_pip
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "/home/sinisa/.pyenv/versions/pypy3.6-7.1.0/lib-python/3/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/home/sinisa/.pyenv/versions/pypy3.6-7.1.0/lib-python/3/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/sinisa/.virtualenvs/project-jhaNgXsO-py3.6/bin/pypy3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 127.
$ poetry run python
[JSONDecodeError]
Unexpected '/' at: line 1 column 1 (char 0)

Does Poetry support pypy3.6? Am I doing something obviously wrong?

Bug stale

Most helpful comment

Workaround for pypy:
python -m venv /home/jimbo1qaz/.cache/pypoetry/virtualenvs/pypy-py3.6 (or whatever path you use) installs a functional pip.
poetry shell works, and pyenv which pip points to /home/jimbo1qaz/.cache/pypoetry/virtualenvs/pypy-py3.6/bin/pip.
pip install cycler; python3 and import cycler works for me.

  • pyenv which python operates outside of poetry shell.

System:

  • Ubuntu 18.04
  • pyenv pypy 3.6.1
  • poetry 0.12.14 (is that different from 1.0.0a2?)

All 6 comments

Workaround for pypy:
python -m venv /home/jimbo1qaz/.cache/pypoetry/virtualenvs/pypy-py3.6 (or whatever path you use) installs a functional pip.
poetry shell works, and pyenv which pip points to /home/jimbo1qaz/.cache/pypoetry/virtualenvs/pypy-py3.6/bin/pip.
pip install cycler; python3 and import cycler works for me.

  • pyenv which python operates outside of poetry shell.

System:

  • Ubuntu 18.04
  • pyenv pypy 3.6.1
  • poetry 0.12.14 (is that different from 1.0.0a2?)

@jimbo1qaz Thanks, that works for me. I'd love it if Poetry did it by default though. :)

@sbidin Thanks for reporting this. We would welcome a pull request that fixes this if you know what the problem is.

@jimbo1qaz do you understand the reason poetry isn't working for this?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Manually creating the venv did not work here with python 3.6.5. After upgrading python to 3.6.9 via pyenv it worked directly with poetry.

System:
Archlinux
poetry 1.0.10

Was this page helpful?
0 / 5 - 0 ratings