首先设置pychram的镜像
官方镜像
https://pypi.python.org/simple
常用的国内镜像源
'''
清华:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣:http://pypi.douban.com/simple
阿里云:http://mirrors.aliyun.com/pypi/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple
华中理工大学:http://pypi.hustunique.com
山东理工大学:http://pypi.sdutlinux.org
'''
全局镜像源配置
全局镜像源配置,在PyCharm终端依次执行如下命令:
pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
如果不想使用全局镜像源,可以通过如下命令单次使用镜像源下载第三方库:
pip install -i <镜像源地址> <第三方库名>
Pycharm配置镜像源
添加时输入网址即可
以安装结巴分词的jieba库为例子
运行安装命令
pip install jieba
查看安装是否成功
pip show jieba
卸载jiaba库
pip uninstall jieba