login community faq

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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(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 Jan 13 '11 at 11:05

CLawlor's gravatar image

CLawlor
214


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,

Tarball

1
http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.21.tar.gz#md5=0057b9d04c821ebf3fdbadeb5a3acb36

SVN source

1
http://svn.osafoundation.org/m2crypto/tags/0.21/

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

answered Jan 13 '11 at 18:45

johns's gravatar image

johns ♦♦
345427

Thanks, that did the trick!

(Jan 13 '11 at 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?

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

You can check out the svn repository using:

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

the SWIG directory will be contained within.

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

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

1
2
[build_ext]
include_dirs=/usr/include/openssl

answered Nov 14 '12 at 19:38

Baron's gravatar image

Baron
12

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Tags:

×236
×64
×1

Asked: Jan 13 '11 at 11:05

Seen: 1,524 times

Last updated: Nov 14 '12 at 19:38

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited