1

I tried to install gmpy2 on my python distribution (Anaconda 64bit) and I did this by downloading the precompiled .PYD file from http://www.lfd.uci.edu/~gohlke/pythonlibs and put the file in the site-packages folder (I tried this with both the 32 bit and 64 bit versions). However when I ran it and tried to import gmpy2 it gave the following error: DLL load failed: %1 is not a valid Win32 application. I do not know how to fix this as everything I am using is 64 bit. I have looked at some of the other answers on this site but none of them seem to help. Does anyone know what I might try to do?

Hadi Khan
  • 577
  • 2
  • 8
  • 30

1 Answers1

1

After downloading the GMPY wheel file from Christoph Gohlke's site, you need to open a command window and change to the folder where you downloaded GMPY, and use pip to install it:

~\Downloads\> pip install gmpy2‑2.0.5‑cp27‑none‑win_amd64.whl

If you don't have pip, use conda to install it first:

~> conda install setuptools pip

Note: I used the tilde to represent C:\Users\<username>\.

Mark Mikofski
  • 19,398
  • 2
  • 57
  • 90