I am trying to install gmpy2 on my Anaconda Python 3.5 distribution using pip. I was able to install other modules such as primefac perfectly. When I try to install gmpy2 this is what I get:
(C:Program FilesAnaconda3) C:WINDOWSsystem32>pip install gmpy2
Collecting gmpy2
Using cached gmpy2-2.0.8.zip
Building wheels for collected packages: gmpy2
Running setup.py bdist_wheel for gmpy2 ... error
Complete output from command "C:Program FilesAnaconda3python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\HADIKH~1\AppData\Local\Temp\pip-build-hd7b270n\gmpy2\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" bdist_wheel -d C:UsersHADIKH~1AppDataLocalTempmplefsjn80pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'gmpy2' extension
creating build
creating buildemp.win-amd64-3.5
creating buildemp.win-amd64-3.5Release
creating buildemp.win-amd64-3.5Releasesrc
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMPIR -DWITHMPFR -DWITHMPC "-IC:Program FilesAnaconda3include" "-IC:Program FilesAnaconda3include" "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCATLMFCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits8.1include\shared" "-IC:Program Files (x86)Windows Kits8.1include\um" "-IC:Program Files (x86)Windows Kits8.1include\winrt" /Tcsrcgmpy2.c /Fobuildemp.win-amd64-3.5Releasesrcgmpy2.obj
gmpy2.c
c:usershadi khanappdatalocalemppip-build-hd7b270ngmpy2srcgmpy.h(104): fatal error C1083: Cannot open include file: 'mpir.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for gmpy2
I have noticed that whenever I try installing gmpy2 on a computer I always get some sort of error and it is a different one every time. Can someone please tell me how to fix this.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…