我正在尝试在虚拟环境中通过 pip 安装旧版本的 Python:
vic@vic ~/projects/ $ mkvirtualenv test
New python executable in test/bin/python
Installing setuptools............done.
Installing pip...............done.
[test] vic@vic ~/projects/ $ pip install python==2.6.6
Downloading/unpacking python==2.6.6
Could not find a version that satisfies the requirement python==2.6.6 (from versions: 2.7.5, 3.3.2, 2.3, 2.4, 2.4, 2.4.1, 2.4.1, 3.3.2, 2.7.5, 2.7.5, 2.5, 2.5)
No distributions matching the version for python==2.6.6
Storing complete log in /home/vic/.pip/pip.log
1 [test] vic@vic ~/projects/ $ python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
[test] vic@vic ~/projects/ $ pip install python==2.4
Downloading/unpacking python==2.4
Downloading Python-2.4.tgz (9.2MB): 9.2MB downloaded
Running setup.py egg_info for package python
Requested python==2.4, but installing version 2.7.5-
Installing collected packages: python
Found existing installation: Python 2.7
Not uninstalling Python at /usr/lib/python2.7/lib-dynload, outside environment /home/vic/projects/venv/test
Running setup.py install for python
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
Complete output from command /home/vic/projects/venv/test/bin/python -c "import setuptools;__file__='/home/vic/projects/venv/test/build/python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-M2b0rc-record/install-record.txt --single-version-externally-managed --install-headers /home/vic/projects/venv/test/include/site/python2.7:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Can't roll back Python; was not uninstalled
Command /home/vic/projects/venv/test/bin/python -c "import setuptools;__file__='/home/vic/projects/venv/test/build/python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-M2b0rc-record/install-record.txt --single-version-externally-managed --install-headers /home/vic/projects/venv/test/include/site/python2.7 failed with error code 1 in /home/vic/projects/venv/test/build/python
Storing complete log in /home/vic/.pip/pip.log
1 [test] vic@vic ~/projects/ $
为什么会失败?
为什么 2.6 版不在 PyPI 中?