pip 安装升级
程序员文章站
2024-03-14 09:21:46
...
环境:
Centos7
CDH5.11
Python2.7.5
pip无法升级的问题解决
下载pip18
源码下载 ,手动安装
wget https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz
tar –zxvf pip-18.0.tar.gz
cd pip-18.0
python setup.py install
pip install scikit-learn==0.20
(安装pandas自动安装numpy)
pip install pandas
pip install PyMySQL==0.10.1
卸载模块
源码安装可能无法pip 卸载,直接删除/usr/lib64/python2.7/site-packages/numpy 目录 和 /usr/lib64/python2.7/site-packages/numpy-1.9.0-py2.7.egg-info 文件 即可重新安装
rm -rf /usr/lib64/python2.7/site-packages/numpy*
安装
pip install numpy
卸载
pip uninstall numpy