conda install 最常见错误的解决方案

Conda 安装库错误

conda install pytorch==1.7.0

安装时相关错误

Collecting package metadata (current_repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 157, in _new_conn
        (self._dns_host, self.port), self.timeout, **extra_kw
      File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
        raise err
      File "/opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
        sock.connect(sa)
    socket.timeout: timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
        chunked=chunked,
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
        self._validate_conn(conn)
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
        conn.connect()
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 334, in connect
        conn = self._new_conn()
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connection.py", line 164, in _new_conn
        % (self.host, self.timeout),
    urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6b2d9ce358>, 'Connection to repo.anaconda.com timed out. (connect timeout=9.15)')
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
        timeout=timeout
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
        method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
      File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/linux-64/current_repodata.json (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6b2d9ce358>, 'Connection to repo.anaconda.com timed out. (connect timeout=9.15)'))

解决方案:遇到这个问题,一定先试一下更新conda库!!!!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值