-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PyPy 3.6 running in macOS Python 3 virtualenv installs pip in wrong location #1654
Comments
Oh, worth noticing: is this maybe linked to #1652? That issue is about |
Did you try to see if using the venv instead of virtualenv gives you the same behaviour? |
We don't patch site.py for Python 3 so the issue is not related. |
OK, will try that as well! I've also just noticed I ran |
Tried out some more things:
|
@YannickJadoul if that's the case please open an issue at https://foss.heptapod.net/pypy/pypy/issues; the problem is upstream not within virtualenv. |
OK, even weirder: running
|
OK, will do. Sorry for the inconvenience! :-/ |
Pre virtualenv 20 we used the python 2 methodologies to create virtual environments, even on python 3; which worked but caused a lot of maintainability issues and was more of a hack rather than a clean supported implementation. With virtualenv 20 we're using the same methodology as upstream does; and as described in https://www.python.org/dev/peps/pep-0405/. This explains why things worked with older virtual environments. Please link here the upstream issue once you open it so people running into the same can find it. Thanks! PS. If upstream detect the issue and is something that can be fixed within virtualenv, please make a comment here and we'll reopen the issue and make it happen. |
Thanks, @gaborbernat! That makes sense indeed :-) Issue reported here: https://foss.heptapod.net/pypy/pypy/issues/3175 |
@gaborbernat In case you're curious: I dug deeper, and found the source of the issue. It's related to Since you probably have a lot of experience dealing with these sorts of things, I'd assume that if you have time, any input or advice from you is welcome! |
Using
get-pip.py
to installpip
in a PyPy 3.6 v7.3.0 installation from within pytest running in a macOS Python 3 virtualenv fails to installpip
in the expected location (pypy3.6-v7.3.0-osx64/bin/pip
), but instead installs it in the outer Python 3 virtualenv.The following script manages to reproduce this on a mac I have access to.
Output
I think the main thing to notice in that whole output, is that when running PyPy 3.6, v7.3.0 from within pytest from within a virtualenv,
-m site
gives this output:while if I afterwards run the same command outside of
pytest
, I get:Things to note:
get-pip.py
works, running through pytest notI have not yet tried (but will, now):
pip
withget-pip.py
.I'll tell the PyPy people on IRC, as well.
PS: I'm really sorry for finding such a nasty bug :-/ This seems horrible to debug.
EDIT: First noticed in the context of pypa/cibuildwheel#274 and #1561.
The text was updated successfully, but these errors were encountered: