使用python的pip安装第三方包的时候会出现这个问题
查看了一些解决方法
关掉一些代理VPN然后重试,再不行就关闭计算机代理:
PS H:\python_project\Python-Multiple-Image-Stitching-master\Python-Multiple-Image-Stitching-master> pip install opencv-contrib-python
ERROR: Exception:
Traceback (most recent call last):File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _mainstatus = self.run(options, args)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapperreturn func(self, options, args)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\commands\install.py", line 315, in runrequirement_set = resolver.resolve(File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 94, in resolveresult = self._result = resolver.resolve(File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 472, in resolvestate = resolution.resolve(requirements, max_rounds=max_rounds)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolveself._add_to_criteria(self.state.criteria, r, parent=None)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteriaif not criterion.candidates:File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__return bool(self._sequence)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 140, in __bool__return any(self)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 128, in <genexpr>return (c for c in iterator if id(c) not in self._incompatible_ids)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 29, in _iter_builtfor version, func in infos:File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 272, in iter_index_candidate_infosresult = self._finder.find_best_candidate(File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\package_finder.py", line 851, in find_best_candidatecandidates = self.find_all_candidates(project_name)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\package_finder.py", line 798, in find_all_candidatespage_candidates = list(page_candidates_it)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidatesyield from self._candidates_from_page(self._link)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\package_finder.py", line 758, in process_project_urlhtml_page = self._link_collector.fetch_page(project_url)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\collector.py", line 490, in fetch_pagereturn _get_html_page(location, session=self.session)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\collector.py", line 400, in _get_html_pageresp = _get_html_response(url, session=session)File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_internal\index\collector.py", line 115, in _get_html_responseresp = session.get(File "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in getFile "G:\ANACONDA\envs\pytorch\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_implreturn ssl_context.wrap_socket(sock)File "G:\ANACONDA\envs\pytorch\lib\ssl.py", line 500, in wrap_socketreturn self.sslsocket_class._create(File "G:\ANACONDA\envs\pytorch\lib\ssl.py", line 997, in _createraise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname