easy_install M2Crypto 在 Windows 平台上失败
我正在尝试在 Windows XP 平台上安装 M2Crypto。我安装了 Python、easy_install 和 SWIG,但是当我尝试 easy_install M2Crypto
时,我得到以下信息:
SWIG\_m2crypto.i(31) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(45) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
error: Setup script exited with error: command 'swig.exe' failed with exit status 1
我在其他地方读到人们建议 easy_install openssl-devel
,但是那只是告诉我没有找到具有该名称的包。该名称是否可能区分大小写(我已经尝试了各种排列但没有成功),或者该建议不适用于 Windows?
我并不是在寻找 M2Crypto 的替代品。我正在挑选一些使用它的现有代码,因此我需要让我的开发环境能够运行已经编写的代码。
I am attempting to install M2Crypto on a Windows XP platform. I have Python, easy_install and SWIG installed, but when I attempt to easy_install M2Crypto
I get the following:
SWIG\_m2crypto.i(31) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(45) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
error: Setup script exited with error: command 'swig.exe' failed with exit status 1
I have read elsewhere that people have suggested easy_install openssl-devel
, but that simply tells me that there are no packages found with that name. Is the name perhaps case-sensitive (I've tried various permutations without success), or does that advice not apply to Windows?
I'm not looking for alternatives to M2Crypto. I am picking up some existing code that uses it, so I need to get my development environment to be able to run what's already written.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如杰伊在他的回答中所说,你应该尝试从源代码构建它。我尝试过。
setup.py
无法识别--openssl
选项。查看默认setup.py
的输出,我意识到搜索位置是c:\pkg
而不是c:\pkg\openssl
。解决方案:
lib
和include< /code> 文件夹到
c:\pkg
swig.exe
在您的路径中可用easy_install M2Crypto
对我来说就像一个魅力。
As jay stated in his answer you should try to build it from source. And I tried. The
setup.py
does not recognize the--openssl
option. Looking at the output from the defaultsetup.py
I realized that the search location wasc:\pkg
and notc:\pkg\openssl
.The solution:
lib
andinclude
folders toc:\pkg
swig.exe
is available in your patheasy_install M2Crypto
Worked for me like a charm.
有类似的问题。下载M2Crypto的源码包并阅读INSTALL文件后,我发现以下内容:
Had a similar problem. After downloading the source package of M2Crypto and reading the INSTALL file I found the following: