环境:centos7
I installed Python 3.4 on CentOS 7.3:
sudo yum install epel-release
sudo yum install python34.x86_64
There was python 2 installed before under
type python
python is hashed (/bin/python)
So version 3 is under python3:
type python3
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:
python3 -m pip install psycopg2
/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?
使用如下方法解决:
sudo yum install python34-setuptools
sudo easy_install-3.4 pip
参考:https://unix.stackexchange.com/questions/345784/bin-python3-no-module-named-pip
本文介绍在CentOS7上安装Python3.4的方法,并详细讲解如何安装和启用pip,以便进行第三方包的管理。文章指出,在安装完Python3.4后,通过yum安装setuptools并使用easy_install-3.4来安装pip。
3550

被折叠的 条评论
为什么被折叠?



