Python package installation exception

I get this exception when installing packages in Python. uninstall python and install it again but no

C:\Users\ramasastri.g\Desktop\pycrypto-2.6>python setup.py install running install running build running build_py running build_ext warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. building 'Crypto.Random.OSRNG.winrandom' extension C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -Isrc/inc-msvc/ -IC:\Python27\include -IC:\Python27\PC /Tcsrc/winrand.c /Fobuild\temp.win32-2.7\Release\src/winrand.obj winrand.c c:\python27\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2 
+4
source share
3 answers

Perhaps you are missing the C ++ compiler.

I installed it using the pre-packaged version here

+1
source

My problem was inside virtualenv. I could not install some packages and got the same fatal error c1083. I tried Visual Studio and PTVS. Just installing the Microsoft Visual C ++ Compiler for Python 2.7 https://www.microsoft.com/en-us/download/details.aspx?id=44266 was not enough to fix the error, despite this.

I found a solution here http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/

The setuptools installed by virtualenv are too old (3.6). You need to remove it and reinstall it, but in the "Install python package" window in the Visual Studio Solution Explorer, instead of using "setuptools" as the name of the module to install, use "setuptools> = 6.0".

0
source

I received the same error message, and it turned out that the reason is that although I set the PATH variable correctly using the paths to Visual Studio and Python, I forgot to add the path C: \ Windows \ System32.

0
source

Source: https://habr.com/ru/post/917564/


All Articles