1、ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
这种很多的,可以把requires前的东西都按版本删了(比如transformers 3.4.0);
如果只有一两条,可以把requires后的东西按版本安装好
2、ModuleNotFoundError: No module named 'xxx’可能的解决方案大全:https://zhuanlan.zhihu.com/p/416872266
3、No module named torchcrf:
pip uninstall torchcrf #首先卸掉以前的torchcrf包
pip install pytorch-crf -i https://pypi.tuna.tsinghua.edu.cn/simple/ #再安装
# 再导入(from torchcrf import CRF)即可
4、pip install nltk 后仍有报错:
先 pip install nltk;然后在github(https://github.com/nltk/nltk_data)上下载语料库;
下载后解压,把里面的packages文件名改成nltk_data,放在该放的路径下(错误提示里会给出路径,如上图最下,我放在了’D:\anaconda3\envs\pytorch_gpu\nltk_data’,这是我虚拟环境的路径)
5、pip install pyahocorasick==1.4.2 报错:
在 https://pypi.org/project/pyahocorasick/ 下载对应版本,然后进到下载目录安装。
可能还是报错:Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”
用微软账号登录 https://my.visualstudio.com/Downloads/Featured?mkt=zh-cn 下载 Visual Studio 2015 update 3:
解压后双击其中的.exe文件,默认安装即可(我是自定义,也装到C盘了,唉3.12GB),再装就成功了。
二、OSError
1、OSError: Windows requires Developer Mode to be activated, or to run Python
以管理员身份运行使用的代码编译器。
2、ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问
把pip install 改成pip install --user
1、ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
报以上冲突,直接改版本号(看具体情况)比如 torchvision 0.12.0 requires torch==1.11.0, but you have torch 1.12.1 which is incompatible. 直接 pip install torch 1.11.0
这个版本是可以的:pytorch 1.11.0、torchvision 0.12.0、torchaudio 0.11.0、cudatoolkit 10.2/11.3
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)