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.

Pip=20.2 break packages installing on pypy

See original GitHub issue

Environment

  • pip version: 20.2
  • Python version:
Python 2.7.13 (7.3.1+dfsg-2~ppa1~ubuntu16.04, Apr 23 2020, 03:08:28)                                                           
[PyPy 7.3.1 with GCC 5.4.0 20160609]
  • OS: tested on linux

Description If you try to install any package with pip install, you will have follow stacktrace:

ERROR: Exception:
Traceback (most recent call last):
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/commands/install.py", line 421, in run
    pycompile=options.compile,
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/req/__init__.py", line 90, in install_given_reqs
    pycompile=pycompile,
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/req/req_install.py", line 831, in install
    requested=self.user_supplied,
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/operations/install/wheel.py", line 829, in install_wheel
    requested=requested,
  File "/home/dsp25no/.pypyenv/site-packages/pip/_internal/operations/install/wheel.py", line 703, in _install_wheel
    assert os.path.exists(pyc_path)
AssertionError

Expected behavior Success package installation with 0 return code.

How to Reproduce

  1. Install pypy
  2. Reproduce
pip wheel pip
virtualenv .pypyenv -p pypy
source .pypyenv/bin/activate
pypy pip-20.2-py2.py3-none-any.whl/pip install --force pip

More info Regression happened in commit 2ece73cc862b8637b9d0da193f5a591fa6d1a2a2. compileall in Cpython generate compile files with names expected in function pyc_output_path, but with pypy filenames will be another, like __pycache__/__init__.pypy-73.pyc

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chrahuntcommented, Jul 31, 2020

Is there a fully compatible mechanism to get the pyc file path that would be generated for a file? I see:

I checked with pypy2.7-7.3.1 (on Linux), but it doesn’t look like either is backported.

PEP 3147 (introduced __pycache__) also mentions a mechanism for detecting whether PEP 3147 is available:

import imp
hasattr(imp, 'get_tag')

which returned False for me on the same version of pypy.

0reactions
hexagonrecursioncommented, Feb 10, 2021

This issue is marked as “python 2 only”. pip 21.0 dropped support for Python 2. Should this be closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

On PyPy, binary wheels broken on pip==20.0.1 #7629 - GitHub
First, download and install PyPy 7.2.0, and install pip==19.3.1: ... about making '2' be an alias for '27' in the pip 20 series...
Read more >
Upgrade to pip 20.2, plus, changes coming in 20.3
Installed packages now contain metadata about whether they were directly requested by the user (PEP 376's REQUESTED file)
Read more >
How to install and work with PyPy - ActiveState
Click to PIP install PyPy and work with it. Also get quick instructions to work with PyPy using Conda.
Read more >
User Guide - pip documentation v22.3.1
It will be stricter - if you ask pip to install two packages with incompatible requirements, it will refuse (rather than installing a...
Read more >
how can i use pip with pypy installed from launchpad?
Be careful with this option - if it decides to install in your system Python directories, it could break other things. Share.
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