Reputation: 41
I need numpy and scipy to perform some signal analysis. Has anyone succeeded in doing this? (I am interested in running it natively, not via virtualenv). My ultimate goal is to build an exe from the python script that uses numpy and scipy that can be run in WinPE for tests.
I have successfully installed python 3.11.2 and am able to get to numpy installation which also fails at this.
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building py_modules sources
creating build
creating build\src.win-arm64-3.11
creating build\src.win-arm64-3.11\numpy
creating build\src.win-arm64-3.11\numpy\distutils
INFO: building library "npymath" sources
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy
Upvotes: 4
Views: 3969
Reputation: 726
Many of the Windows/Arm64 libraries are yet to be built and problems ironed out. I ended up building everything on WSL/Ubuntu.
It's easy with vscode as it can connect to the WSL and pretty much do everything as build normally.
Upvotes: 0
Reputation: 545
This will be an interesting exercise. If you have experience in building software go straight ahead. If you're new to building packages, then you might need a different way.
To build windows+ARM native packages of numpy and scipy:
This is a large task, and even then some of the packages may have bugs that are exposed when you try and do Windows + ARM.
Can you use an emulated python environment? e.g. does Windows+ARM permit x86_64 python interpreters to run? Alternatively could you use WSL to run a Python interpreter?
Upvotes: 2
Reputation: 1
Numpy and Scipy don't provide pre-built binary wheels for Windows Arm64 yet and need to be built from the source during installation. You will need to install Visual Studio 2019 with C/C++ toolchains.
Upvotes: 0
Reputation: 4668
This might be because you need Microsoft Visual C++ 14.0 or greater installed to build numpy you can download the latest build tool here https://visualstudio.microsoft.com/visual-cpp-build-tools/
then you should be able to install numpy and SciPy with this in your command prompt
pip install numpy scipy
Upvotes: 1