I am trying to install the Python module simplecrypto on a Windows machine. To do this I run the following:
C:\Python36\Scripts>pip install simplecrypto
However, upon running this partway through the installation process I receive the following error:
...
Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\EDM-P\\AppData\\Local\\Temp\\pip-build-teqxfnwt\\PyCrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EDM-P\AppData\Local\Temp\pip-nrmsip8r-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\EDM-P\AppData\Local\Temp\pip-build-teqxfnwt\PyCrypto\
Why is this the case?
An error occurs when it attempts to install PyCrypto, which is a requirement of the package. The GitHub README mentions:
If the dependency installation fail on Windows, you may want to use a
prebuilt installer. If you wish to compile it I suggest using the
Mingw tools as indicated here.
Install it from here and then compile by
install MinGW with C++ Compiler option checked add C:\MinGW\bin to
your PATH in PYTHONPATH\Lib\distutils, create a file distutils.cfg and
add these lines:
[build] compiler=mingw32
Related
I tried to install Twisted using pip
pip3 install Twisted
However I got the following errors
running build_ext
building 'twisted.test.raiser' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'
----------------------------------------
Command "c:\python361\python.exe -u -c "import setuptools, tokenize;__file__='C:
\\Users\\User\\AppData\\Local\\Temp\\pip-build-32gww8wb\\twisted\\setup.py';f=ge
tattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.cl
ose();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppD
ata\Local\Temp\pip-f8823kmo-record\install-record.txt --single-version-externall
y-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Tem
p\pip-build-32gww8wb\twisted\
I checked the directory in my computer, I indeed do not have the lib folder in path C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1. I have downloaded Visual Studio 2015 Community but it does not solve the problem.
Is there any thing I need to set after downloading Visual Studio ?
How to solve this problem ?
Updated:
I want to compile this program https://github.com/KDE/kajongg which require me to install Twisted.
I am using python2.7 and created a virtual environment 'kivyenv'.
First i install Cython and then kivy in kivyenv.
pip install Cython
pip install kivy
kivy failed to install giving some error :-
In file included from /tmp/pip-build-4T9oG4/kivy/kivy/graphics/opengl.c:274:0:
/tmp/pip-build-4T9oG4/kivy/kivy/graphics/gl_redirect.h:43:22: fatal error: GL/gl.h: No such file or directory
# include <GL/gl.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/root/kivyenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4T9oG4/kivy/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-3__DxE-record/install-record.txt --single-version-externally-managed --compile --install-headers
/root/kivyenv/include/site/python2.7/kivy" failed with error code 1 in /tmp/pip-build-4T9oG4/kivy/
I am using Ubuntu 16.
This is happening because you do not have dependency libraries installed on your system, specifically the ones for OpenGL - most likely you do not have mesa packages installed.
Follow the instructions for your specific distribution on how to install all of the needed dependencies at: https://kivy.org/docs/installation/installation-linux.html#using-software-packages
had the same problem. the following worked for me:
pip(3) install Cython==0.26
pip(3) install kivy
hope it helps
I was trying to install 'ffnet' module in Python but even after installing Microsoft Visual Studio C++ and mingw32.
But these are the errors which are showing up:
1.' Failed building wheel for ffnet'
2.#Command "c:\anaconda3\python.exe -u -c "import setuptools, #tokenize;__file__='C:\\Users\\AKSHAY~1.BAB\\AppData\\Local\\Temp\\pip-build-#930xyr3q\\ffnet\\setup.py';exec(compile(getattr(tokenize, 'open', open)####(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record #C:\Users\AKSHAY~1.BAB\AppData\Local\Temp\pip-_pl92yit-record\install-record.txt #--single-version-externally-managed --compile" failed with error code 255 in C:\Users\AKSHAY~1.BAB\AppData\Local\Temp\pip-build-930xyr3q\ffnet\
Please anyone Help me with this.
On Windows + Python-3.5 fortran extensions cannot be built
anymore with f2py and mingw32 compilers, because of new MSVC used for python build. See: Build fortran extension on Windows with gfortran and MSVC
Maybe you could try python 3.4 instead?
In trying to install a python package via pip I get the error:
Failed building wheel for atari-py
Running setup.py clean for atari-py
Failed to build atari-py
Installing collected packages: atari-py, PyOpenGL
Running setup.py install for atari-py ... error
Complete output from command C:\Users\xxxxxx\AppData\Local\Continuum\Anaconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\xxxxxx\\appdata\\local\\temp\\pip-build-qhuh1q\\atari-py\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\xxxxxx\appdata\local\temp\pip-z8wnzs-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
Unable to execute 'make build -C atari_py/ale_interface -j 3'. HINT: are you sure `make` is installed?
error: [Error 2] The system cannot find the file specified
In my system when I type make:
C:\Users\xxxxxx>make
'make' is not recognized as an internal or external command,
operable program or batch file.
So, clearly make is missing. But I installed make using conda:
C:\Users\xxxxxx>conda install mingw
Fetching package metadata .........
Solving package specifications: ..........
# All requested packages already installed.
# packages in environment at C:\Users\xxxxxx\AppData\Local\Continuum\Anaconda2:
#
mingw 4.7
So I have mingw 4.7 already installed.
How could I remove the error and get the package?
Many thanks for the help.
make is not in your PATH.
Do echo %PATH% and check if the path to your msys utilities is in there. Otherwise you can edit this variable by following the instructions here: Adding directory to PATH Environment Variable in Windows
I am getting following error in installing Cassandra driver for python.
Command "c:\python33\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\vmasama\\appdata\\local\\temp\\pip-build-we10p7\\cassandra-driver\\setup
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n
', '\n'), __file__, 'exec'))" install --record c:\users\vmasama\appdata\local\te
mp\pip-olh8j5-record\install-record.txt --single-version-externally-managed --co
mpile" failed with error code 1 in c:\users\vmasama\appdata\local\temp\pip-build
-we10p7\cassandra-driver\
Any one have any idea about this ? What am i missing ?
Following errors were also there when i run pip install cassandra-driver
Failed building wheel for cassandra-driver
Failed cleaning build dir
for cassandra-driver
python version : 3.3
I tried it in an environment missing compiler paths and observed something similar. I think it's a problem in setuptools error handling when it doesn't find what it's expecting. The easiest way I've found is to use the VS Command Prompt shortcut installed with Visual Studio:
Perhaps the easiest way to do this is to run the build/install from a Visual Studio Command Prompt (a shortcut installed with Visual Studio that sources the appropriate environment and presents a shell).
http://datastax.github.io/python-driver/installation.html#windows-installation-notes