Reputation: 552
i am trying to install gmpy via pip install gmpy
in a test environment that was created using virtualenv but it is kicking back an error
my laptop is a windows 8.1 x64 using Python 27 x32
i installed the Microsoft Visual C++ Compiler Package for Python 2.7 because i was getting the unable to find vcvarsall.bat
error message. once i installed the C++ Compiler Package for Python 2.7 and upgraded setuptools to 7.0
that message went away but i get the following:
c:\envs\testenv1\build\gmpy\src\gmpy.h(30) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Cleaning up...
Removing temporary dir C:\envs\testenv1\build...
Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
Exception information:
Traceback (most recent call last):
File "C:\envs\testenv1\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\envs\testenv1\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\envs\testenv1\lib\site-packages\pip\req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\envs\testenv1\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\envs\testenv1\Scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\envs\\testenv1\\build\\gmpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user_name\appdata\local\temp\pip-t4r7jf-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\envs\testenv1\include\site\python2.7 failed with error code 1 in C:\envs\testenv1\build\gmpy
can someone point me in the right direction?
i have the following installed:
Microsoft Visual 2008 Redistributable - x64 9.0.30729.6161
Microsoft Visual 2008 Redistributable - x86 9.0.30729.6161
Microsoft Visual 2010 x64 Redistributable - 10.0.40219
Microsoft Visual 2010 x86 Redistributable - 10.0.40219
Microsoft Visual 2012 Redistributable (x64) - 11.0.61030
Microsoft Visual 2012 Redistributable (x86) - 11.0.61030
Microsoft Visual C++ Compiler Package for Python 2.7
i do not want to install VS2008 or MINGW. i was hoping the "Microsoft Visual C++ Compiler Package for Python 2.7" would rectify the problem but it didnt.
Upvotes: 0
Views: 2741
Reputation: 41
I would suggest you to install the anaconda distribution on your system. Installing gmpy2 using conda is really simple. It takes care of all the dependencies for you. All you need to do is type the command : conda install gmpy2 inside your environment and you'll have it installed in a few seconds.
Upvotes: 0
Reputation: 11404
I maintain gmpy
and l'll just say it is very challenging to build gmpy
and gmpy2
on Windows. Is there a reason you can't use the pre-built binaries? gmpy
/ gmpy2
rely on a single DLL so it fairly easy to copy to a different location if needed.
Upvotes: 1