Install python in linux and pip and linuxpythonpip
I tried to install python in a linux environment recently, but the installation of python and pip on the Internet is a bit confusing, so today I will summarize the experience of my predecessors and hope to help you.
Download python source code package:
Https://www.python.org/downloads/
When installing python, ImportError: cannot import name HTTPSHandler ImportError: No module named setuptools may cause problems, prevent the above problems from occurring. yum-y install zlib-devel yum install gcc-c ++ install the required compiler yum install openssl-y yum install openssl-devel- y unzip and install python tar-zxvf Python-2.7.13.tgz cd Python-2.7.13. /configure -- prefix =/usr/local/Python2.7 make & make install update compiler rm/usr/bin/python ln-s/usr/lo Cal/Python2.7/bin/python/usr/bin/python vim/usr/bin/yum first line modified #! /Usr/bin/python2.6 create a library file and refresh the library file. solution 1: cd/etc/ld. so. conf. d/vim python2.7.conf/usr/local/Python2.7/lib ldconfig solution 2: cd/etc/ld. so. conf. d/echo '/usr/local/Python2.7/lib'> python2.7.conf install setuptools to facilitate pip installation later # wget https://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz -- no-check-certificate # tar zxvf setuptools-2.0.tar.gz # cd setuptools-2.0 # python setup. py build # python setup. py install pip # wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" -- no-check-certificate # tar-xzvf pip-1.5.4.tar.gz # cd pip-1.5.4 # python setup. py install
Install and test pip
Pip install nose
Refer to blog:
Http://blog.csdn.net/u013372487/article/details/51726002
Http://blog.csdn.net/yabingshi_tech/article/details/50439142