环境:Centos6.5,新安装的系统
1.第一次安装时,未安装任何依赖包,安装到最后有一个告警:Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS,未在意
2.安装ipython,安装完成后进入ipython提示缺少traitlets
3.安装pip模块,安装过程中提示需要setuptools 模块
4.安装setuptools安装包,提示依赖zlib,安装zlib-devel,安装后还是不行。
5.注意到安装python最后提示pip未安装成功,缺少SSL/TLS,遂删除python安装的目录,先安装openssl-devel包,后再次安装python,最后提示:
Installing collected packages: setuptools, pip Successfully installed pip-7.1.2 setuptools-18.2
6.重复第二部的步骤,然后就直接可用pip安装缺少的模块。
完整安装步骤:
yum -y install openssl-devel tar xf Python-3.5.0.tgz cd Python-3.5.0/ ./configure --prefix=/usr/local/python3.5 make -j 4 && make install #因是4核CPU,故这里使用4,这里适自己情况而定 echo "export PATH=/usr/local/python3.5/bin:\$PATH" > /etc/profile.d/python3.5.sh . /etc/profile.d/python3.5.sh tar xf ipython-5.0.0.tar.gz cd ipython-5.0.0/ python3.5 setup.py install pip3.5 install traitlet pip3.5 install pygments pip3.5 install pexpect pip3.5 install pickleshare pip3.5 install prompt_toolkit pip3.5 install simplegeneric
注:
更新pip版本:# pip3.5 install -U pip
时间: 2024-10-05 04:45:22