简体   繁体   中英

Downgrade python 2.7.8 to python 2.7.6 due to poplib 'line too long' error

Lately I have been getting poplib 'line too long' errors. Turns out Openshift has change python version to 2.7.8. How do I go about changing it back to python 2.7.6 on Openshift? I have tried (after ssh)

source ~/python/virtenv/bin/activate
pip install --log $OPENSHIFT_DATA_DIR/inst.log http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

Looking at inst.log, it says:

Downloading/unpacking http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
Downloading from URL http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
Running setup.py egg_info for package from http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

running egg_info
creating pip-egg-info/Python.egg-info
writing pip-egg-info/Python.egg-info/PKG-INFO
writing top-level names to pip-egg-info/Python.egg-info/top_level.txt
writing dependency_links to pip-egg-info/Python.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found


reading manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
Source in /tmp/pip-on_Q8u-build has version 2.7.8, which satisfies requirement Python==2.7.8 from http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
Cleaning up...

How do I override this in order to put back python 2.7.6? Thanks.

The only way that you can use an earlier version of python would be to use the DIY cartridge and compile python yourself within your gear, which is not recommended. The update was done to fix security issues as noted by other comments, you would need to adjust your code to work with the new version (just like you would on any other system that has done security patches)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM