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
setuptools requires pip #18955
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Works for me:
|
comment:3
Perhaps it would be good to mention exactly which commands you executed. |
comment:4
The "setuptools is already installed" message makes me strongly suspect that pip is also already installed. You won't be able to reproduce this if you're in an old checkout where pip is installed. I too can get the setuptools spkg to install if I (manually) ensure pip is already installed, which I mentioned in my OP workaround. To test, python -m pip should fail with "no such module". I ran Demo session:
I've also attached the unadulterated install log. |
setuptools install log |
comment:5
Attachment: setuptools-12.4.log If I install from a fresh version 6.8 tarball (from http://files.sagemath.org/src/index.html), I don't see this problem. setuptools is installed before pip, and the string "pip" is not found anywhere in the setuptools log file. Could you have some environment variable which is interfering? Or some Python configuration file? |
comment:6
jhpalmieri: You didn't show results of my pre-condition test:
I'll try to trace through the code and pinpoint the issue. |
comment:7
So. I traced through it. I believe the sequents of events are this:
In summary, NOTABUG. Possibly it's a pbr or setuptools bug, but probably not. That said, sage --env could prevent this issue in future by setting |
comment:8
In case anyone cares to know, I got into this state by running |
comment:9
So is a patch like this worthwhile? diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg
index f4b085b..0de067a 100755
--- a/build/bin/sage-spkg
+++ b/build/bin/sage-spkg
@@ -148,6 +148,9 @@ if [ -n "$PYTHONPATH" ]; then
fi
fi
+# Set PYTHONNOUSERSITE=yes to avoid trouble with setuptools.
+export PYTHONNOUSERSITE=yes
+
##################################################################
# Handle special command-line options
################################################################## This should set |
comment:10
I would set it while running sage as well, and change the comment to "prevent ~/.local python packages from interfering with sage". As far as I've seen, the sage philosophy is that sage dependencies are essentially separate from any system software. Replying to @jhpalmieri:
|
comment:11
Okay, see #14243. |
comment:12
I propose closing this as duplicate/invalid/wontfix. |
In the current master branch (7eb8510), when I
./sage -i setuptools
it fails with this message:This timeout is caused by the "poison" proxy:
but I don't know why the process is searching for pip. My workaround was
python -m ensurepip
, but that's only going to work for python>=2.7.9.I also tried
sage -i pip
, but it depends on setuptools, so that's circular.I'm not sure how you're going to solve this.
Component: packages: standard
Issue created by migration from https://trac.sagemath.org/ticket/18955
The text was updated successfully, but these errors were encountered: