-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Build isolation fails with system-wide pip<10 and user-site pip==10.0.0 #5224
Comments
When you say "system-wide pip<10 and user-site pip==10.0.0" you have (different versions of) pip installed in the 2 places? That sounds unlikely to work. I'm not even sure it's something that Python supports... |
The system-wide python install essentially always has some version of pip installed. Installing newer versions of software using "pip install --user" has always worked for me so far. Using the "--user" flag is even recommended here: |
The problem seems to be that something inside pip adds |
Installing packages in user-site is indeed recommended. But that should be instead of the system site-packages, not as well. I don't think anyone has ever recommended having 2 different versions of a package installed in 2 separate locations on The failure is because when pip 10 tries to run |
I believe it's not correct to state that different versions in sys.path are not supported --- it's always been the case that the package that comes first wins. This is also something that's assumed by several scenarios that deal with setting PYTHONPATH environment variable. I already provided a reproducible test case above. |
If pip does not support having different versions installed in system site-packages and user site-packages, then "pip install --upgrade --user" should simply refuse to install a newer version of the package to the user-site directory if it's already present system-wide. However, this does not seem like it was the intent with the |
Switching to a more recent version of a system package by installing a newer version in the user site is common use case. Anyway, I don't think the command to install the build requirements should be isolated: it's already using |
The reason the build requirements are installed using But the issue here is that for some reason, when pip runs |
The problem is not |
Oh! I see what you're saying - https://github.com/pypa/pip/blob/master/src/pip/_internal/build_env.py#L56 is where I'm not the best person to comment on that code - it's dealing with situations I never really understood in detail. @pradyunsg are you able to comment? |
I'm looking into it, but as stated above, I don't think we want build isolation for the command used to install the build dependencies. |
Cool thanks |
(ignore that last comment) |
Just in case this may help others in the same situation as me, who ended up here searching for a solution: I have a local python 3.6 install, with |
Here's another way I ran into this problem and how I resolved it in case it helps anyone. I have some build scripts for my software which are also used to upgrade a developer's environment in-place after we update pip and other package versions. What happened is that, when the old version of pip is still installed, my script untargz'ed the new pip and ran setup.py install on it. This seemed to happily install the new version of pip while also leaving the old one in place, causing various problems. The fix for my upgrade script was to run this first: |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
Apparently, the combination of system-wide installation of pip<10 and user-site installation of pip>=10 makes projects with
pyproject.toml
fail to build.I would expect user-site installation of pip to work.
What I've run:
Note that the error occurs before executing setup.py
The text was updated successfully, but these errors were encountered: