Unable to install M2Crypto package - python

I am using Win7 64 bit machine with Python 2.7 installed. I have installed swigwin 3.0.5. When I do "pip install M2Crypto" I got the following errors:
SWIG\_m2crypto.i(30) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(33) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
In some links I found the suggestion is to install openssl-dev. But I could not find the equivalent package for windows (pip install openssl-dev does not work and I have done pip install pyOpenSSL which did not help me).
Thanks in advance for your help in this issue.

Not sure what your OS is. But to solve the issue on MAC OS X Yosemite you need to reinitialise xcode command line tools by using this command in terminal.
xcode-select --install
This solved the problem for me.

Related

Get ERROR: sling-2.0.0-py3-none-linux_x86_64.whl is not a supported wheel on this platform

I get the error "ERROR: sling-2.0.0-py3-none-linux_x86_64.whl is not a supported wheel on this platform. " when trying to install this SLING package.
I run the following command:
$ sudo -H pip3 install http://www.jbox.dk/sling/sling-2.0.0-py3-none-linux_x86_64.whl
ERROR: sling-2.0.0-py3-none-linux_x86_64.whl is not a supported wheel on this platform.
This is my python version:
$ python --version
Python 3.7.3
I check various posts but still don't know how to get rid of it. Please help me, thank you!
These install instructions will not work on a Mac - only on linux. See the bottom of the install page https://github.com/google/sling/blob/master/doc/guide/install.md
Sling install guide says "We currently do not support OSX, but you can check out issue #189 for help on building on OSX."
https://github.com/google/sling/issues/189
Your milage may vary. Those tips are two years old, and things may have changed so they may not work. It may be simplest to run a linux virtual machine on your Mac, into which you install python sling.

pip install -U yotta : errors out in Win10 [duplicate]

I'm get the following error when running pip install cryptography:
build\temp.win32-2.7\Release\_openssl.c(434) : fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory
I'm running windows 10, 64 bit, with python 2.7. I'm trying to install cryptography 1.9.
Installing openssl and changing environment variables fixed this problem for me.
Install OpenSSL by using the installer from here: https://slproweb.com/products/Win32OpenSSL.html
Use the Win32OpenSSL-1_1_0f, even if your system is 64 bit (I tried installing the 64 bit version of OpenSSL and this did not fix the problem)
The following two folders should now exist: C:\OpenSSL-Win32\include, C:\OpenSSL-Win32\lib
Open a cmd line terminal and run the following:
> set INCLUDE=C:\OpenSSL-Win32\include;%INCLUDE%
> set LIB=C:\OpenSSL-Win32\lib;%LIB%
> pip install cryptography
I had the same problem on Fusion, which was resolved by upgrading pip.

Having trouble with PyEnchant installation on El Capitan

It's possible I should just open this is an issue on the Enchant package, but it could definitely be something I'm missing too. I'm using El Capitan and python 2.7. I tried a few things:
pip install penchant seems to successfully install pyenchant-1.6.6, but when I try to import enchant I get the error ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI. I followed the advice here and upgraded pip.
I followed the advice here and started with brew install enchant, but that gave the error
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "glib--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/af332f42fae80c570a77/raw/7b5fd0d2e6554e9b770729fddacaa2d648327644/glib-hardcoded-paths.diff
I also downloaded the wheel here (second-to-last link) and tried to pip install it, but got the error that it is not a supported wheel on this platform.
Thoughts? Thanks.

Installing Python-Tesseract on a Linux system

I am having trouble installing python-tesseract on my linux system. I've been using this tutorial:
http://delimitry.blogspot.be/2014/10/installing-tesseract-for-python-on.html
The error I get is:
File does not exist:['/usr/include/tesseract/capi.h', '/usr/local/include/tesseract/capi.h', '/opt/include/tesseract/capi.h', '/opt/local/include/tesseract/capi.h']
root#opencv:/home/philipp/python-tesseract#
When running python setup.py clean in /python-tesseract after following the rest of the instructions in order.
Running linux 3.2.0-4-amd64 on this system.
Whereis tesseract-ocr returns:
/usr/share/tesseract-ocr
Whereis leptonica returns:
/usr/include/leptonica
Whereis tesseract returns:
tesseract: /usr/bin/tesseract /usr/bin/X11/tesseract /usr/include/tesseract/ /usr/share/man/man1/tesseract.1.gz
I've also tried running a few other tutorials/guides to install python-tesseract that have returned other errors such as, missing libleptonica then missing libc6 but I havn't investigated these as much. Just tried to see if any other guides worked immidiately.
Also, when I run tesseract in the terminal it works, but import tesseract does not.
What am I doing wrong? How can I fix this and install python-tesseract?
I think this way could work for you:
1- download python-tesseract_0.9-0.5ubuntu3_vivid_amd64.deb from here
2- install gdebi-core
sudo apt-get install gdebi-core
3- install python-tesseract_0.9-0.5ubuntu3_vivid_amd64.deb with gdebi
sudo gdebi python-tesseract_0.9-0.5ubuntu2_i386.deb

Cannot install python module: command '/usr/bin/llvm-gcc' failed with exit status 1

Can someone help me with that issue, I have found many post reporting the same error but no solution worked for me. I got the same error with multiple modules.
I am setting up os X 10.7. I have Xcode 4.3.2 installed, I have download the Command Line Tools.
I have installed python2.7 by following this tutorial: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#lion.
Now I am trying to install some other modules like igraph using the following command: pip install python-igraph and I get this error:
lipo: can't open input file: /var/folders/XXX (No such file or directory)
error: command '/usr/bin/llvm-gcc' failed with exit status 1
I get the same error for multiple package :(
I have already tried to :
export ARCHFLAGS="-arch i386 -arch x86_64"
and to follow the things given in :
http://waqasshabbir.tumblr.com/post/19073648382/llvm-gcc-4-2-exe-error-on-mac-osx-lion-when-building
Thanks for your help
I once had a similar issue with Linux and pip. Using "sudo pip install...." solved the problem for me. Maybe this works for OS X too.
Good luck.
I finally managed to install igraph doing:
brew install igraph
sudo pip install python-igraph
However I still have the problem for other modules !!!!
thanks for your help

Categories