问题
hardware/software: Machine 64 AMD processor running 64 bit windows
I have a computationally heavy program that I wish to speed up by using Pypy. I have installed pypy and also installed Microsoft Visual Studio and Microsoft Visual C++ Build Tools.
My python program uses Numpy so I tried to install numpy on pypy using the following
pypy3 - m pip install numpy
The error message I get says:
error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
However I have already installed Microsoft Visual C++ Build Tools? I reinstalled it several times but got the same results.
How can I successfully install numpy for pypy3?
command used :
pypy3 - m pip install numpy
I expect numpy to be installed on PYPY but the results I get are:
c:\pypy\pypy3.6-v7.0.0-win32\lib-python\3\distutils\dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win32-3.6
creating build\src.win32-3.6\numpy
creating build\src.win32-3.6\numpy\distutils
building library "npymath" sources
error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
回答1:
You might need to run pypy3 -mpip install --upgrade setuptools to get a version of setuptools that can find your build tools. You can also pypy3 to use your version of the build tools by running pypy3 from a developer command prompt, be sure to choose the 32-bit version of the developer tools (pypy on windows is not available in a 64-bit version)
来源:https://stackoverflow.com/questions/55310564/how-can-i-install-numpy-on-pypy-on-my-64-bit-computer-running-windows-64-bit