在python 2.7下在64位窗口上安装扭曲

时间:2018-03-17 22:44:48

标签: python python-2.7 pip windows-10 twisted

有谁知道如何做到这一点。我用Google搜索了,我能想出的最好的事情就是:

pip install autobahn [twisted]

当我这样做时,我在命令窗口中收到此错误

C:\Users\<User Name>\Desktop>pip install autobahn[twisted]
Collecting autobahn[twisted]
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading autobahn-18.3.1-py2.py3-none-any.whl (283kB)
    100% |################################| 286kB 1.0MB/s
Collecting txaio>=2.7.0 (from autobahn[twisted])
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "c:\python27\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 821, in unpack_url
    hashes=hashes
  File "c:\python27\lib\site-packages\pip\download.py", line 659, in unpack_http_url
    hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 853, in _download_http_url
    stream=True,
  File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "c:\python27\lib\site-packages\pip\download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "c:\python27\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "c:\python27\lib\site-packages\pip\_vendor\requests\adapters.py", line 497, in send
    raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

我不知道如何解决错误

1 个答案:

答案 0 :(得分:-1)

转到University of California Irvine's Unofficial Windows Binary for Python Extension Packages并下载Twisted wheel文件。这是简单的方法。困难的方法需要安装编译器(包含在Windows Built Tools中)。

请注意!!!! 对于任何绊到这个帖子的人来说,只有最新的软件包可以通过加州大学欧文分校的网站下载(通常),所以保存二进制文件以备将来使用。如果需要特定版本,这非常有用。否则,特定的编译器需要用于编译包。

参考