M2Crypto python3 installation error on Ubuntu 19.04

4.3k Views Asked by At

I am not knowing how to download and install M2Crypto on Ubuntu 19.04 for Python3.

I have Python 3.7.3 installed on my Ubuntu 19.04, I tried the following in order:

1- sudo apt-get install swig (worked fine)

2- brew install openssl (worked fine)

3- pip3 install m2crypto (gave the following error [shown in image])

Please help me fix it, how can I install M2Crypto on Ubuntu for Python3? Thank you in advance.

https://i.stack.imgur.com/vcLVo.jpg

2

There are 2 best solutions below

0
mcepl On
  1. you don't have installed openssl-dev package (you don't have to use brew, it is in apt-get)
  2. why not apt-get install python-m2crypto ?
0
Jürgen Weigert On

My Ubuntu-18.04 does not have python3-m2crytpo, which is a shame. It only has python-m2crypto which does not work for python3 (sorry mcepl). I suppose Ubuntu 19.04 has the same issue.

For me this works fine to get the package installed:

apt-get install build-essential libssl-dev swig python3-dev
pip3 install M2Crypto

(I had a peek at pip3 download M2Crypto; tar xvf M2Crypto*tar*; less M2Crypto*/INSTALL.rst to get these dependencies straight.)