发生HTTP错误403:尝试安装virtualenvwrapper-powershell

时间:2019-12-05 15:18:45

标签: python powershell pip virtualenv virtualenvwrapper

我正在尝试遵循this教程,目前处于virtualenv + virtualenvwrapper步骤。运行pip install virtualenv可以正常工作。但是,当我尝试pip install virtualenvwrapper-powershell时,出现以下错误:

    ERROR: Command errored out with exit status 1:
 command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\zakst\\appdata\\local\\temp\\pip-install-ekeoqg\\virtualenvwrapper-powershell\\setup.py'"'"'; __file__='"'"'c:\\users\\zakst\\appdata\\local\\temp\\pip-install-ekeoqg\\virtualenvwrapper-powershell\\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\zakst\appdata\local\temp\pip-install-ekeoqg\virtualenvwrapper-powershell\pip-egg-info'
     cwd: c:\users\zakst\appdata\local\temp\pip-install-ekeoqg\virtualenvwrapper-powershell\
Complete output (24 lines):
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\zakst\appdata\local\temp\pip-install-ekeoqg\virtualenvwrapper-powershell\setup.py", line 11, in <module>
    distribute_setup.use_setuptools()
  File "distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "distribute_setup.py", line 124, in _do_download
    to_dir, download_delay)
  File "distribute_setup.py", line 193, in download_setuptools
    src = urlopen(url)
  File "c:\python27\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "c:\python27\lib\urllib2.py", line 435, in open
    response = meth(req, response)
  File "c:\python27\lib\urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "c:\python27\lib\urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "c:\python27\lib\urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "c:\python27\lib\urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: SSL is required
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我尝试过的事情:

  1. 更新点
  2. 重新启动Powershell / PC
  3. 运行pip install virtualenvwrapper-powershell -i https://pypi.python.org/simple/(与上述错误相同)
  4. 在尝试安装软件包时,对pypi.org,files.pythonhosted.org和pypi.python.org使用--trusted-host命令(返回与上述相同的错误)。
  5. 将上述URL添加为pip.ini中的受信任主机(返回与上述相同的错误)。
  6. 直接从here下载virtualenvwrapper-powershell(并尝试下载其版本2.7.1)并运行setup.py。仍然出现相同的403错误。
  7. 在不同的计算机上执行上述所有操作,该计算机也运行Windows 10,并且全新安装,并且在不同的网络上。

在解决这个问题时,我应该尽力而为,因为我遇到的几乎所有解决此问题的方法都涉及上述一件事情,但没有一件对我有用。在Windows 10上使用Python 2.7.17。

0 个答案:

没有答案
相关问题