1.Anaconda下载包速度过慢的解决方式
1.1 设置镜像源(以清华镜像源为例)
#设置镜像源(不确定是否能成功)
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
国内镜像源地址
# 国内镜像源地址
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
1.2 使用指令临时更改下载库的镜像源
# 用豆瓣镜像源安装django
pip install django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
# 如果上面指令有权限问题,使用下面的语句
pip install --user django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
2. Anaconda下安装cvxopt
在安装cvxopt包时,使用pip安装会报错,解决方案如下:
//直接使用这条命令,即可在win64下安装cvxopt
conda install -c conda-forge/label/gcc7 cvxopt
//linux64对应命令行如下:
conda install -c conda-forge cvxopt
//osx64:
conda install -c conda-forge/label/cf201901 cvxopt
3. scikit-surprise库安装问题
#方法一:
conda install -c conda-forge scikit-surprise
#方法二:
#下载工具: 链接:https://pan.baidu.com/s/1rlyMkZOnunjuXNafWbk-WQ 密码:4S3P
pip install scikit-surprise
4.No module named ‘exceptions’
问题描述:python3.6 import docx
后 ,文件报错 moduleNotFoundError:No module named 'exceptions'
问题原因:python3.x版本移除了exceptions模块,但是docx包中引用了该模块
解决方案:安装最新版python-docx模块即可
pip install python-docx