I'm trying to install the braintree python module, which requires M2Crypto. I've addded the /usr/include/openssl dir to my ~/.pydistutils.cfg file, as described here, but now I'm getting the following error:

(som)[mediastreet@dweb76 M2Crypto-0.21]$ python setup.py test
running test
running egg_info
writing M2Crypto.egg-info/PKG-INFO
writing top-level names to M2Crypto.egg-info/top_level.txt
writing dependency_links to M2Crypto.egg-info/dependency_links.txt
reading manifest file 'M2Crypto.egg-info/SOURCES.txt'
writing manifest file 'M2Crypto.egg-info/SOURCES.txt'
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/local/include/python2.6 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_m2crypto.i:58: Error: Unable to find '_threads.i'
SWIG/_m2crypto.i:59: Error: Unable to find '_lib.i'
SWIG/_m2crypto.i:60: Error: Unable to find '_bio.i'
SWIG/_m2crypto.i:61: Error: Unable to find '_bn.i'
SWIG/_m2crypto.i:62: Error: Unable to find '_rand.i'
SWIG/_m2crypto.i:63: Error: Unable to find '_evp.i'
SWIG/_m2crypto.i:64: Error: Unable to find '_aes.i'
SWIG/_m2crypto.i:65: Error: Unable to find '_rc4.i'
SWIG/_m2crypto.i:66: Error: Unable to find '_dh.i'
SWIG/_m2crypto.i:67: Error: Unable to find '_rsa.i'
SWIG/_m2crypto.i:68: Error: Unable to find '_dsa.i'
SWIG/_m2crypto.i:69: Error: Unable to find '_ssl.i'
SWIG/_m2crypto.i:70: Error: Unable to find '_x509.i'
SWIG/_m2crypto.i:71: Error: Unable to find '_asn1.i'
SWIG/_m2crypto.i:72: Error: Unable to find '_pkcs7.i'
SWIG/_m2crypto.i:73: Error: Unable to find '_util.i'
SWIG/_m2crypto.i:74: Error: Unable to find '_ec.i'
SWIG/_m2crypto.i:75: Error: Unable to find '_engine.i'
SWIG/_m2crypto.i:76: Error: Unable to find '_objects.i'
error: command 'swig' failed with exit status 1
(som)[mediastreet@dweb76 M2Crypto-0.21]$ python --version
Python 2.6.5
(som)[mediastreet@dweb76 M2Crypto-0.21]$ openssl
OpenSSL> version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
OpenSSL> exit
(som)[mediastreet@dweb76 M2Crypto-0.21]$ swig --version
Unable to find option or file '--version', use 'swig -help' for more information.
(som)[mediastreet@dweb76 M2Crypto-0.21]$ swig -version

SWIG Version 1.3.29

Compiled with g++ [i686-redhat-linux-gnu]
Please see http://www.swig.org for reporting bugs and further information
(som)[mediastreet@dweb76 M2Crypto-0.21]$

I have python aliased to python2.6 in my ~/.bash_profile for convenience. The above shows that I was attempting a 'manual' install (downloading source and running setup.py), but I get the same result with easy_install-2.6 (or easy_install-2.5, for that matter).

I'm not sure what to do at this point, any suggestions would be appreciated.

asked 13 Jan '11, 11:05

CLawlor's gravatar image

accept rate: 0%

I spent a while debugging this and I discovered the files it wants are actually missing from the tarbal they provide but are in the SVN repo,



SVN source


I was able to get past the above error by checking out everything in the SWIG directory manually.

permanent link

answered 13 Jan '11, 18:45

johns's gravatar image

johns ♦♦
accept rate: 23%

Thanks, that did the trick!

(13 Jan '11, 20:23) CLawlor CLawlor's gravatar image

Hi, I am having the same issue. Can you tell me how to check out everything in the SWIG directory manually?

(07 May '12, 02:44) xpanta xpanta's gravatar image

You can check out the svn repository using:

svn checkout http://svn.osafoundation.org/m2crypto/tags/0.21/ m2crypto-0.21

the SWIG directory will be contained within.

(07 May '12, 02:50) ryans ♦♦ ryans's gravatar image

It worked for me by adding to ~/.pydistutils.cfg file:

permanent link

answered 14 Nov '12, 19:38

Baron's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Jan '11, 11:05

question was seen: 3,299 times

last updated: 14 Nov '12, 19:38

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited