M2Crypto Doesn't Install in Venv, or Swig Doesn't Define _X86_64_ Which Breaks Compiling Against Openssl

M2Crypto doesn't install in venv, or swig doesn't define __x86_64__ which breaks compiling against OpenSSL

M2Crypto supplies a fedora_setup.sh script to handle the problems with Fedora/RL/CentOs releases, but pip, of course, doesn't know anything about it.

After the pip install fails, it leaves the downloaded stuff in the venv/build/M2Crypto directory. do this:

cd <path-to-your-venv>/venv/build/M2Crypto
chmod u+x fedora_setup.sh
./fedora_setup.sh build
./fedora_setup.sh install

This has worked in my install process

Unable to install M2Crypto package in Windows 8.1 64 bit machine

Installing M2Crypto on Windows is a pain. Fortunately, some people have gone to the effort of creating Windows installers for M2Crypto:

  • https://pypi.python.org/pypi/M2CryptoWin64
  • http://the.randomengineer.com/2014/07/29/ssl-for-python-m2crypto-on-windows/

You can also use a slightly older version of the package directly from the maker's of M2Crypto as they actually provided Windows installable versions of it for a while:

  • http://chandlerproject.org/bin/view/Projects/MeTooCrypto

This was also a useful link:

  • https://geekproit.wordpress.com/2011/03/02/openssl-and-m2crypto-with-python-on-windows/

pip install M2Crypto failing

This is a swig version issue. Latest version of swig gives Syntax error. I switched to an older version (SWIG Version 3.0.2) to overcome this issue.

problems installing M2Crypto on Mint

It looks that you miss the python-dev package which contains python.h

Installing M2Crypto inside of virtualenv without installing swig to the system

So in the end I got this to work by letting buildout handle downloading and installing swig and M2Crypto and then just moving the built M2Crypto and EGG-INFO directories from where buildout put them to where virtualenv wanted them...this might not be the optimal solution, but hey, it worked.



Related Topics



Leave a reply



Submit