pytorch 源码安装的问题记录

1,下载第三方库

git submodule update --init --recursive


这个初始化下载指令 必须运行完毕。中途中断很可能后续安装失败

2,python setup.py install

报出的环境缺少库文件  请对应查找环境  conda 和pip最好不要混用,conda优先,查看你的pip指令是否在conda内,apt get 也是必须需要的。

我的缺少

Traceback (most recent call last):
  File "setup.py", line 145, in <module>
    from setuptools import setup, Extension, distutils, Command, find_packages
ImportError: No module named setuptools

解决: sudo apt-get install -y python-setuptools

Traceback (most recent call last):
  File "setup.py", line 710, in <module>
    build_deps()
  File "setup.py", line 275, in build_deps
    check_pydep('yaml', 'pyyaml')
  File "setup.py", line 315, in check_pydep
    raise RuntimeError(missing_pydep.format(importname=importname, module=module))
RuntimeError: Missing build dependency: Unable to `import yaml`.
Please install it via `conda install pyyaml` or `pip install pyyaml`

解决:conda install pyyaml

 

3,反复增删源码 产生的git问题

git clone --recursive https://github.com/pytorch/pytorch
Cloning into 'pytorch'...
fatal: unable to access 'https://github.com/pytorch/pytorch/': error setting certificate verify locations:
  CAfile: /home/f1684326/.conda/envs/caffe2/ssl/cacert.pem
  CApath: /home/f1684326/.conda/envs/caffe2/ssl/cacert.pem

解决

(caffe2) :~/github$ git config --system http.sslverify false

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值