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

CLawlor
215
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,

Tarball

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

SVN source

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.

link

answered 13 Jan '11, 18:45

johns's gravatar image

johns ♦♦
4.1k28
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
1

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:

[build_ext]
include_dirs=/usr/include/openssl
link

answered 14 Nov '12, 19:38

Baron's gravatar image

Baron
13
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

By RSS:

Answers

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

Tags:

×272
×76
×2

Asked: 13 Jan '11, 11:05

Seen: 2,110 times

Last updated: 14 Nov '12, 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