search

Home  >  Q&A  >  body text

linux - What else needs to be done to run get-pip.py using a non-system version of python?

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.

世界只因有你世界只因有你2763 days ago963

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-06-05 11:13:20

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

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-06-05 11:13:20

    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

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-05 11:13:20

    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.

    reply
    0
  • Cancelreply