0

I have just installed python 3.9 x64, and during the install I have selected to include pip.

I can see that I indeed have x64 version (running import struct;print( 8 * struct.calcsize("P")) in python does indeed return 64).

I run pip by calling Python39\python.exe -m pip install numpy, however I can see that it installs the x32 version of numpy:

enter image description here

and if I run python, import numpy I get the following error: OSError: [WinError 193] %1 is not a valid Win32 application

How can I make it so that pip installs x64 versions?

Danny
  • 13
  • 4
  • You can manually download the 64-bit whl file here: https://pypi.org/project/numpy/#files – jdabtieu Apr 21 '21 at 16:51
  • I did, but it wont install it properly: `C:\Windows\System32>pip install "C:\Users\XXXX\Downloads\numpy-1.20.2+mkl-cp39-cp39-win_amd64.whl" ERROR: numpy-1.20.2+mkl-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.` – Danny Apr 21 '21 at 16:53
  • Maybe your pip is out of date. Try python -m pip install --upgrade pip and then installing it again. Also, are you absolutely _sure_ that your Python is 64-bit? pip should try to install the 64-bit version if your Python install is 64-bit. Also you could try removing +mkl in the filename because [apparently](https://stackoverflow.com/a/37046355) just having the wrong filename will fail. – jdabtieu Apr 21 '21 at 17:03
  • Also - do you have 32-bit Python installed on your computer somewhere else? I noticed in your pip command in the comments that you just ran pip install, which could invoke the 32-bit version if you have 32-bit Python. If that is the case, make sure you're invoking the 64-bit pip with `path/to/new/python/python -m pip install` – jdabtieu Apr 21 '21 at 17:06
  • I did the upgrade, and it is running the x64. The way I checked is that I am running `path\to\python.exe` and then I do check its x64, then when calling pip I do it by `path\to\python.exe -m pip ..` and still no luck.. – Danny Apr 22 '21 at 18:05
  • That's really strange...you might want to reinstall Python then, something might be corrupted – jdabtieu Apr 23 '21 at 03:14

0 Answers0