如何在 Windows 7 64 位上安装 PyOpenSSL?
要让 Scrapy 在 HTTPS 上运行,我需要 PyOpenSSL,但我似乎无法让它发挥作用。
那么,有 64 位版本可用吗? 我没有看到... 我已经安装了 32 位版本,但是...
我目前从 Scrapy 收到此错误:
ERROR: Error downloading <https://SOME_PRIVATE_URL_HERE>:
[Failure instance: Traceback: <class 'scrapy.exceptions.NotSupported'>:
HTTPS not supported: install pyopenssl library
有谁知道如何获取或编译 64 位版本吗?或者说这是没有必要的?
To get Scrapy working on HTTPS, I need PyOpenSSL, but I can't seem to get this to work.
So, is there a 64-bit version available? I don't see one... I have installed the 32-bit version but...
I currently get this error back from Scrapy:
ERROR: Error downloading <https://SOME_PRIVATE_URL_HERE>:
[Failure instance: Traceback: <class 'scrapy.exceptions.NotSupported'>:
HTTPS not supported: install pyopenssl library
Does anyone have a clue how to obtain or compile a 64-bit version? Or is that unneccesary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上,本网站的第 9 步将解决您的问题。
http://steamforge.net/wiki/index.php/How_to_Install_Scrapy_in_64-bit_Windows_7
编辑:包括来自 steamforge 的内容:
注释
Windows 注册表项
安装过程
http://www.python.org/getit/
菜单并输入“regedit”并按 Enter
使用左窗格导航到
“HKEY_LOCAL_MACHINE\SOFTWARE\Python” &单击它(突出显示
蓝色)
每行(一个简单的方法是查找并替换
在查找字段中输入“SOFTWARE”,在字段中输入“SOFTWARE\Wow6432Node”
替换字段
启动注册表修改
现在从以下位置下载 Scrapy 0.14 Windows 安装程序
http://pypi.python.org/pypi/Scrapy
http://twistedmatrix.com/trac/wiki/Downloads
下载并安装 Zope。界面
http://python-distribute.org/distribute_setup.py(右键单击
&保存),然后双击安装
http://pypi.python.org/pypi/zope.interface/3.8 .0#下载
和文件 窗格如上)并导航到您的 Python 脚本
文件夹(类似于“cd C:\Python27\Scripts”)
C:\Downloads\zope.interface-3.8.0-py2.6-win-amd64.egg”
(将 C:\Downloads\ 替换为您下载的位置
Zope.Interface to)并按 Enter
下载并安装 lxml-2.3.2.win-amd64-py2.7.exe
http://www.lfd.uci.edu/~gohlke/pythonlibs/
下载并安装
egenix-pyopenssl-0.13.0_1.0.0g_1.win-amd64-py2.7.msi 来自
http:// /www.egenix.com/cryptodownload/?file=egenix-pyopenssl-0.13.0_1.0.0g_1.win-amd64-py2.7.msi
将其指向您的 Python 2.7 目录(默认为 C:\Python27)
安装 w3lib
“cmd”)
“C:\Python27\Scripts”)
现在我们只需要将 Python Scripts 文件夹添加到系统路径
所以我们可以使用scrapy
选择“属性”
并双击它
你安装了Python)在该行的末尾
Actually, step 9 at this website will resolve your issue.
http://steamforge.net/wiki/index.php/How_to_Install_Scrapy_in_64-bit_Windows_7
EDIT: Including the content from steamforge:
Notes
Windows Registry Keys
Install Procedure
http://www.python.org/getit/
menu and type “regedit” and hit enter
Using the left pane navigate to
“HKEY_LOCAL_MACHINE\SOFTWARE\Python” & click on it (highlighting
it in blue)
every line (an easy way to do this is to do a find and replace
with “SOFTWARE” in the Find Field and “SOFTWARE\Wow6432Node” in
the Replace Field
initiate a Registry Modification
Now download the Scrapy 0.14 Windows installer from
http://pypi.python.org/pypi/Scrapy
http://twistedmatrix.com/trac/wiki/Downloads
Download and install Zope.Interface
http://python-distribute.org/distribute_setup.py (right click
& save), then double click it to install
http://pypi.python.org/pypi/zope.interface/3.8.0#downloads
and files pane as above) and navigate to your Python Scripts
folder (something like “cd C:\Python27\Scripts”)
C:\Downloads\zope.interface-3.8.0-py2.6-win-amd64.egg”
(replacing C:\Downloads\ with wherever you downloaded
Zope.Interface to) and hit enter
Download and install lxml-2.3.2.win-amd64-py2.7.exe from
http://www.lfd.uci.edu/~gohlke/pythonlibs/
Download and install
egenix-pyopenssl-0.13.0_1.0.0g_1.win-amd64-py2.7.msi from
http://www.egenix.com/cryptodownload/?file=egenix-pyopenssl-0.13.0_1.0.0g_1.win-amd64-py2.7.msi
point it to your Python 2.7 Directory (C:\Python27 by default)
Install w3lib
“cmd”)
“C:\Python27\Scripts”)
Now we just need to add the Python Scripts folder to the System Path
so we can use scrapy
select “Properties”
and double click on it
you installed Python) at the end of the line
您的问题是未安装 PyOpenSSL。你没有说,但我从你的问题推断你已经安装了 32 位版本的 PyOpenSSL,但使用的是 64 位版本的 Python。那是行不通的。
如果您确实无法获得 64 位版本的 PyOpenSSL,那么最简单、也可能是唯一的解决方案是安装 32 位版本的 Python、Scrapy 及其所有依赖项。如果您有勇气,那么您可以尝试从 64 位源代码进行编译,但我对 PyOpenSSL 的了解不够,无法判断这是否实用。
Your problem is that PyOpenSSL is not installed. You don't say, but I infer from your question that you have installed a 32 bit version of PyOpenSSL but are using a 64 bit version of Python. That won't work.
If you really can't get a 64 bit version of PyOpenSSL, then the simplest, and possibly the only, solution will be to install 32 bit versions of Python, Scrapy and all its dependencies. If you are feeling brave then you could attempt to compile from source for 64 bit but I don't know enough about PyOpenSSL to say whether or not that's practical.
eGenix.com 提供 Windows 32 位和 64 位安装程序。我刚刚下载并安装了 Python 2.6 的 Windows 64 位安装程序,它解决了我的问题。
eGenix.com provides Windows 32-bit and 64-bit installers. I just downloaded and installed the Windows 64-bit installer for Python 2.6 and it resolved my issue.