【问题标题】:Could not fetch URL https://pypi.org/simple/absl-py/: when creating condas environment from file无法获取 URL https://pypi.org/simple/absl-py/:从文件创建 condas 环境时
【发布时间】:2022-01-14 23:29:12
【问题描述】:

我正在尝试从我拥有的 yml 文件创建 anacondas 环境,我已安装 anacondas,已添加

C:\ProgramData\Anaconda3 
C:\ProgramData\Anaconda3\bin 
C:\ProgramData\Anaconda3\Scripts 
C:\ProgramData\Anaconda3\Library\bin

全部到我的路径目录,仍然遇到同样的问题:

Pip subprocess output:
Could not fetch URL https://pypi.org/simple/absl-py/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/absl-py/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Pip subprocess error:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/absl-py/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/absl-py/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/absl-py/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/absl-py/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/absl-py/
ERROR: Could not find a version that satisfies the requirement absl-py==1.0.0 (from versions: none)
ERROR: No matching distribution found for absl-py==1.0.0
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

failed
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda_env\cli\main.py", line 80, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda_env\cli\main_create.py", line 141, in execute
    result[installer_type] = installer.install(prefix, pkg_specs, args, env)
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda_env\installers\pip.py", line 70, in install
    return _pip_install_via_requirements(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda_env\installers\pip.py", line 53, in _pip_install_via_requirements
    stdout, stderr = pip_subprocess(pip_cmd, prefix, cwd=pip_workdir)
  File "C:\ProgramData\Anaconda3\lib\site-packages\conda_env\pip_util.py", line 41, in pip_subprocess
    raise CondaEnvException("Pip failed")
conda_env.exceptions.CondaEnvException: Pip failed

看起来它试图指向“https://pypi.org/simple/absl-py/:”而不是“https://pypi.org/simple/absl-py/”但我是不确定这是否完全没问题,只是其他地方有问题。

【问题讨论】:

  • 你试过重新安装anaconda吗?
  • @VaiTon 是的,多次

标签: python pip anaconda anaconda3 absl-py


【解决方案1】:

设法通过将“libcrypto-1_1-x64.dll”和“libssl-1_1-x64.dll”文件从 Anaconda3\Library\bin 位置复制到 Anaconda3\envs\DLLs 文件夹来找到解决方案.似乎是一个糟糕的修复,但经过数小时的查找,这是我唯一能找到解决问题的方法

【讨论】:

    猜你喜欢
    • 2021-01-13
    • 2021-01-31
    • 1970-01-01
    • 2019-03-22
    • 2014-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多