环境:centos7

I installed Python 3.4 on CentOS 7.3:

  1.  
    sudo yum install epel-release
  2.  
    sudo yum install python34.x86_64

There was python 2 installed before under

  1.  
    type python
  2.  
    python is hashed (/bin/python)

So version 3 is under python3:

  1.  
    type python3
  2.  
    python3 is hashed (/bin/python3)

On Windows, I have version 3.5 and the way I install packages is:

python -m pip install <package_name>

So I tried the same on CentOS but calling python3 instead of python:

  1.  
    python3 -m pip install psycopg2
  2.  
    /bin/python3: No module named pip

How do I install or enable pip in Python 3.4 on CentOS so that I can install packages?

使用如下方法解决:

  1.  
    sudo yum install python34-setuptools
  2.  
    sudo easy_install-3.4 pip

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-11-30
  • 2021-08-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-25
  • 2021-06-16
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案