1.python -m spacy download en_core_web_sm显示connect错误时
离线安装:
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz
pip install /your path/en_core_web_sm-2.0.0.tar.gz
或者在解压到setup.py时,使用setup install 安装:python setup.py install
最后:
import spacy
spacy.load("en_core_web_sm")
2.环境重新配置
先激活原有环境
备份原有安装包pip freeze > ~/requirement.txt
将环境删除conda remove -n *** --all
重建环境
激活
然后pip install -r ~/requirement.txt 即可。
3.安装多cuda环境
cuda官方下载地址: https://developer.nvidia.com/cuda-toolkit-archive
安装torch不是一定要安装cudnn
若cuda和torch安装完毕,必须进行测试以验证torch是否与cuda版本一致,否则在运行
a = torch.Tensor([3])
a
a.cuda()
a
会出现RuntimeError: CUDA error: no kernel image。。。。。
4.curl运行过程中出现如下错误
If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL).If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
解决办法:
echo "check_certificate = off" >> ~/.wgetrc
echo "insecure" >> ~/.curlrc
5.subprocess.CalledProcessError: Command 'XXX' returned non-zero exit status 1.
pgrep python | xargs kill -s 9