Impossible to install old versions of pip via get-pip
See original GitHub issueHi,
I distribute a number of Python packages, and I try to make sure that these packages work with old versions of Python, going back to 2.5. Your move to drop 2.5 broke all my automated tests (thanks!), but what’s worse is that I was unable to install an old version of pip reliably to maintain my ability to test on 2.5. get-pip for version 1.3.1 (which nominally should support 2.5) produces this:
Downloading/unpacking pip
Running setup.py egg_info for package pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
Running setup.py install for pip
/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/download.py:582: Warning: 'with' will become a reserved keyword in Python 2.6
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/download.py", line 582
with open(cache_content_type_file) as fp:
^
SyntaxError: invalid syntax
<SNIP>
SyntaxError: ('future feature unicode_literals is not defined',)
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Installing pip script to /var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/bin
Installing pip-2.5 script to /var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/bin
Successfully installed pip
Successfully? No, not quite:
+ pip install pytest
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/bin/pip", line 9, in <module>
load_entry_point('pip==1.4', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 346, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2516, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2210, in load
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/util.py", line 17, in <module>
from pip.vendor.distlib import version
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/vendor/distlib/version.py", line 13, in <module>
from .compat import string_types
File "/var/lib/jenkins/jobs/pyopencl2/workspace/cl_dev/intel/node/master/py_version/2.5/.env/lib/python2.5/site-packages/pip/vendor/distlib/compat.py", line 276
return b''
^
SyntaxError: invalid syntax
What command will work to reliably install pip across 2.5…3.x the way get-pip.py
did until two days ago?
Issue Analytics
- State:
- Created 10 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
pip trying to install using old version of python - Stack Overflow
1 Answer 1 · try command python -m pip install --upgrade pip · Delete and clear environment config and install again...
Read more >How to Install Pip on Windows - ActiveState
Click to install Python's standard package manager, Pip, on Windows ... But if you're using an older version of Python, pip will need...
Read more >Pip not working due to old version of pip existing - Ask Ubuntu
PIP is a Python package manager tool, it is like the top-level package administrator, it surely cannot install itself. It seems your Python...
Read more >Using Python's pip to Manage Your Projects' Dependencies
The pip install <package> command always looks for the latest version of the package and installs it. It also searches for dependencies listed ......
Read more >Install Python, pip, and the EB CLI on Linux
If your distribution didn't come with Python, or came with an earlier version, install Python before installing pip and the EB CLI. To...
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 FreeTop 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
Top GitHub Comments
One can now use
$ python get-pip.py 'pip==N'
or$ python get-pip.py 'pip<N'
for any version N#2393 was a PR so I created the corresponding issue #3336 and a new PR: #3337 .