如何在Windows上安装M2crypto

2024-05-13 20:04:38 发布

您现在位置:Python中文网/ 问答频道 /正文

installing OpenSSL之后,下载pre-built Swig executable,并确保openssl libraries are located in the defaultc:\pkgpip install m2crypto结果:

...
C:\Program Files (x86)\gfortran\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Pyth
on27\include -IC:\Python27\PC -Ic:\pkg\include -Ic:\users\evbo\appdata\local\tem
p\pip_build_evbo\m2crypto\SWIG -c SWIG/_m2crypto_wrap.c -o build\temp.win32-2.7\
Release\swig\_m2crypto_wrap.o -DTHREADING

gcc: error: unrecognized command line option '-mno-cygwin'

error: command 'gcc' failed with exit status 1

似乎binary installer solution for M2crypto已经不可用了,而且我看不到基于M2crypto install doc的任何错误。

如何解决此安装问题?是否依赖于旧版本的GCC?


Tags: installpipbuildincludepkgerrorswiggcc
3条回答

https://gitlab.com/m2crypto/m2crypto项目提供m2cypto的Windows版本。

我从https://ci.appveyor.com/project/dwoz/m2cryptohttps://ci.appveyor.com/project/dwoz/m2crypto/build/job/y7yri08k45mn5nlj/artifacts安装了M2Crypto-0.30.1-cp27-cp27m-win_amd64.whl轮子,它工作得很完美。

下面是如何使用64位Python2.7的pip进行此操作:

pip install https://ci.appveyor.com/api/buildjobs/y7yri08k45mn5nlj/artifacts/dist/M2Crypto-0.30.1-cp27-cp27m-win_amd64.whl

注意!目前,AppVeyor中的工件已过期,有关更新,请参见this bug

2019年底了,安装M2Crypto仍然是一件痛苦的事!经过一番搜索,终于找到了下面的步骤:

pip install wheel
pip install M2CryptoWin32

在Windows10上使用新的Python2.7.1732bit安装。您可能需要先安装http://aka.ms/vcpython27

如果您安装了64位Python,我想应该使用m2cyptowin64。

相关问题 更多 >