安装过程中遇到的小Bug

1.python -m spacy download en_core_web_sm显示connect错误时

在线安装:pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.0.0/en_core_web_md-2.0.0.tar.gz​​​​​​​​​​​​​

离线安装:

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值