linux - What else needs to be done to run get-pip.py using a non-system version of python?
世界只因有你
世界只因有你 2017-06-05 11:11:20
0
3
841

Because the working environment is centos6.X and the python that comes with the system is 2.6, it does not support many new modules very well. So download and compile python2.7.13 and then link to the python2.7 command. After downloading get-pip.py and running it using python2.7, it will be prompted that it has been installed under site-packages in the python2.7 installation directory. However, the command was not found when entering pip (it should be a non-system version, and no connection was created). I would like to ask how to operate now. pip only needs to install modules for python2.7, and the system's native python will not touch it.

世界只因有你
世界只因有你

reply all(3)
洪涛

Python multi-version management tool, it is recommended to use pyenv

phpcn_u1582

You can make a soft connection to the pip corresponding to python2.7 called pip27. Just don’t conflict with the system default one. If you want to install the module, use pip27 to install it on python27

我想大声告诉你
  1. You need to know where you are using pip and whether it has been added to the environment variables

  2. You can use python (27 version of python) -m pip to call pip

  3. You can also change the python soft connection, but it may be risky, because some system software may use the system's python, so using a soft connection like python27 is a better method

  4. Use pyenv, but be aware that it may modify the system python, and it also has python shell/local/global configuration.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!