Please be gentle on me. I have searched the site, and I know there is another answer to this exact question, but the answers posted there aren't working for me.
I am trying to install pycrypto
, so that I can get paramiko
to work. Paramiko
is failing because of a missing pycrypto
module. I have tried using pip install pycrypto
which succeeds, but does not cure the problem.
I have tried installing a binary version of pycrypto
and that doesn't solve the problem.
Now I am trying to build pycrypto
. I have cygwin64
and mingw
installed on my machine. The approach that gets the farthest is
python setup.py build --compiler=mingw32
This gets to an error,
checking whether we are cross compiling... configure: error: in `/cygdrive/c/Python27/pycrypto-2.6.1':
configure: error: cannot run C compiled programs.
The other answer suggests removing spaces in the path. I have tried reducing the path to simply
c:\mingw;c:\python2.7;c:\cygwin64\bin
with no change to the result?
Does anyone have a fix they can point me to? Thank you. The overall goal is to get paramiko
to work. The paramiko
error is
ImportError: No module named Crypto.PublicKey
In my case, the /tmp
mount point was mounted with the noexec
flag.
For windows with cygwin, I would check the mount point too, as well as dependencies such as the vcredist
packages required for python2 and python3, see also Errors while building/installing C module for Python 2.7.
Two solutions for linux:
e.g.:
sudo mount -o remount,rw,exec /tmp
e.g.:
mkdir -p ~/python/tmp
pip install --build ~/python/tmp pycrypto
Note: it's worth looking at the other answers:
autoconf
and python2-dev
or python3-dev
packages are installed.I had a similar problem:
pip install --upgrade subprocess32
failed with
configure: error: cannot run C compiled programs
on aws
after our admins tightened the settings and mounted tmpfs
with the noexec
option.
The solution was
TMPDIR=/var/tmp pip install --upgrade subprocess32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With