安装doccano包 ERROR: Command errored out with exit status 1:Could not fetch URL https://pypi.org/simpl

安装doccano包 ERROR: Command errored out with exit status 1:Could not fetch URL https://pypi.org/simple/doccano/: There was a problem confirming the ssl certificate: ERROR: No matching distribution found for doccano


https://pypi.org/simple/doccano/: There was a problem confirming the ssl certificate:
ERROR: No matching distribution found for doccano)

问题
安装doccano 出现问题

Could not fetch URL https://pypi.org/simple/doccano/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/doccano/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement doccano (from versions: none)
ERROR: No matching distribution found for doccano

(打不开网页,下载不了匹配的doccano)
环境:win 10
anaconda 自带python 3.7
单独下载 python 3.9.6

解决
1.更新pip 版本

pip install --upgrade pip -http://mirrors.aliyun.com/pypi/simple/

2.在安装的python3.9.6\Scripts 中cmd pip install doccano

3.带上国内网站,并设置为trusted-host 建议使用阿里云

pip install doccano -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

详细步骤:
doccano 要求是python 3.8 +
所以新下载python 3.9.6 在D盘
在这里插入图片描述
在这里插入图片描述

该配置环境的统统写上,一个不落
开始就出现了问题
在这里插入图片描述

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/doccano/
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/doccano/
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/doccano/
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/doccano/
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/doccano/
Could not fetch URL https://pypi.org/simple/doccano/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/doccano/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement doccano (from versions: none)
ERROR: No matching distribution found for doccano

解决方案
就是下载不了,需要增加 国内镜像网址
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

第二个问题出现
解决方案:对应的python 安装路径下的Scripts 文件进行cmd

ERROR: Command errored out with exit status 1:
     command: 'D:\anaconda\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MAC\\AppData\\Local\\Temp\\pip-install-wko4jtni\\doccano\\setup.py'"'"'; __file__='"'"'C:\\Users\\MAC\\AppData\\Local\\Temp\\pip-install-wko4jtni\\doccano\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\MAC\AppData\Local\Temp\pip-install-wko4jtni\doccano\pip-egg-info'
         cwd: C:\Users\MAC\AppData\Local\Temp\pip-install-wko4jtni\doccano\
    Complete output (38 lines):
    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/setuptools-scm/
    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/setuptools-scm/
    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/setuptools-scm/
    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/setuptools-scm/
    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/setuptools-scm/
    ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
    ERROR: No matching distribution found for setuptools_scm
    Traceback (most recent call last):
      File "D:\anaconda\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "D:\anaconda\lib\subprocess.py", line 363, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['D:\\anaconda\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\MAC\\AppData\\Local\\Temp\\tmprf49aki6', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.


    During handling of the above exception, another exception occurred:


    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\MAC\AppData\Local\Temp\pip-install-wko4jtni\doccano\setup.py", line 80, in <module>
        'Programming Language :: Python :: Implementation :: PyPy'
      File "D:\anaconda\lib\site-packages\setuptools\__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "D:\anaconda\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "D:\anaconda\lib\site-packages\setuptools\dist.py", line 721, in fetch_build_eggs
        replace_conflicting=True,
      File "D:\anaconda\lib\site-packages\pkg_resources\__init__.py", line 783, in resolve
        replace_conflicting=replace_conflicting
      File "D:\anaconda\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "D:\anaconda\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
        return installer(requirement)
      File "D:\anaconda\lib\site-packages\setuptools\dist.py", line 777, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "D:\anaconda\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['D:\\anaconda\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\MAC\\AppData\\Local\\Temp\\tmprf49aki6', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

具体问题是
在这里插入图片描述
找不到自动对应的版本,提示setuptools_scm 有问题
在其他人的bug案例中,出现了比如:
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

pip install 包 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
附件:
搜集了一些国内的pip源,如下:

阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
————————————————

主要意思就是位于pypi.douban.com的存储库不是受信任的或安全的主机,正在被忽略。
要求使用“–trusted host pypi.douban.com”允许此警告

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值