康达pypi证书验证失败'

时间:2019-05-15 14:57:06

标签: python pip anaconda conda pypi

试图为conda构建pip包spark-sklearn,遇到ssl错误,

如果是pip包,我将跳过这样的证书:

pip --trusted-host pypi.org --trusted-host files.pythonhosted.org

但是当我这样做

  
    

conda骨架pypi spark-sklearn

  

遇到ssl证书verify_failed

离开构建/测试目录:   工作:  / home / spothineni / anaconda3 / conda-bld / skeleton_1557931569827 / work   测试:  / home / spothineni / anaconda3 / conda-bld / skeleton_1557931569827 / test_tmp 离开构建/测试环境:   测试: 源激活/ home / spothineni / anaconda3 / conda-bld / skeleton_1557931569827 / _test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold   建立: 源激活/ home / spothineni / anaconda3 / conda-bld / skeleton_1557931569827 / _build_env

回溯(最近通话最近):   wrap_socket中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py”,第453行     cnx.do_handshake()   在do_handshake中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py”,行1915     self._raise_ssl_error(self._ssl,结果)   _raise_ssl_error中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py”,行1647     _raise_current_error()   文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/OpenSSL/_util.py”,第54行,在exception_from_error_queue中     引发exception_type(错误) OpenSSL.SSL.Error:[('SSL例程','tls_process_server_certificate','证书验证失败')]

在处理上述异常期间,发生了另一个异常:

回溯(最近通话最近):   在urlopen中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py”,第600行     分块=块状)   _make_request中的第343行的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py”     self._validate_conn(conn)   _validate_conn中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py”,行839     conn.connect()   连接中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/connection.py”,第344行     ssl_context =上下文)   ssl_wrap_socket中的第344行的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/util/ssl_.py”     返回context.wrap_socket(sock,server_hostname = server_hostname)   在wrap_socket中,文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py”行459     引发ssl.SSLError('握手不好:%r'%e) ssl.SSLError:(“错误的握手:错误([(('SSL例程','tls_process_server_certificate','证书验证失败')]))”)

在处理上述异常期间,发生了另一个异常:

回溯(最近通话最近):   发送中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/adapters.py”,行449     超时=超时   在urlopen中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py”,第638行     _stacktrace = sys.exc_info()[2])   文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py”,第398行,递增     引发MaxRetryError(_pool,url,error或ResponseError(cause)) urllib3.exceptions.MaxRetryError:HTTPSConnectionPool(host ='pypi.io',端口= 443):url超过了最大重试次数:/ pypi / spark-sklearn / json(由SSLError(SSLError(“不正确的握手:Error([[ 'SSL例程','tls_process_server_certificate','证书验证失败')]))))))))

在处理上述异常期间,发生了另一个异常:

回溯(最近通话最近):   在第11行的文件“ / home / spothineni / anaconda3 / bin / conda-skeleton”     sys.exit(main())   主目录中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_skeleton.py”     返回执行(sys.argv [1:])   执行中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_skeleton.py”,第61行     version = args.version,config = config)   文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/conda_build/api.py”,第289行     递归=递归,config = config,** kwargs)   文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/conda_build/skeletons/pypi.py”第246行     pypi_resp = requests.get(package_pypi_url,verify = not _ssl_no_verify())   在获取的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/api.py”中,行75     返回请求('get',url,params = params,** kwargs)   在请求中,文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/api.py”,第60行     return session.request(method = method,url = url,** kwargs)   请求中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/sessions.py”,第533行     resp = self.send(准备,** send_kwargs)   发送文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/sessions.py”,行646     r = adapter.send(request,** kwargs)   发送中的文件“ /home/spothineni/anaconda3/lib/python3.7/site-packages/requests/adapters.py”,行514     引发SSLError(e,request = request) requests.exceptions.SSLError:HTTPSConnectionPool(host ='pypi.io',端口= 443):url超过了最大重试次数:/ pypi / spark-sklearn / json(由SSLError(SSLError(“错误的握手:Error([[ 'SSL例程','tls_process_server_certificate','证书验证失败')]))))))))

0 个答案:

没有答案