Pip=20.2 break packages installing on pypy
See original GitHub issueEnvironment
- 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
- Install pypy
- 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:
- Created 3 years ago
- Reactions:8
- Comments:8 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there a fully compatible mechanism to get the pyc file path that would be generated for a file? I see:
importlib.util.cache_from_source
was introduced in 3.4.imp.cache_from_source
doesn’t state an introduction version, but the Python 2 docs forimp
don’t mention it (and it’s not present in my local 2.7.17).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:which returned
False
for me on the same version of pypy.This issue is marked as “python 2 only”. pip 21.0 dropped support for Python 2. Should this be closed?