pythongmpy

Installing gmpy2 on windows using pre-compiled binaries


I am trying to install the gmpy2 package as its an requirement for the PHE package. As suggested in "GMPY2 not installing", I have tried to install it via pre-compliled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/.

However when I try to install it via

pip install gmpy2-2.0.8-cp36-cp36m-win32.whl

I get the following result:

C:\Users\adria\Desktop>pip install gmpy2-2.0.8-cp36-cp36m-win32.whl

Requirement 'gmpy2-2.0.8-cp36-cp36m-win32.whl' looks like a filename, but the file does not exist

Processing c:\users\adria\desktop\gmpy2-2.0.8-cp36-cp36m-win32.whl Exception: Traceback (most recent call last): (...)

Is it a problem that the download from http://www.lfd.uci.edu/~gohlke/pythonlibs/ is saved as zip file?

I use Python 3.6.3 on Win10.


Solution

  • If you try to install without specifying the file extension (i,e : pip install gmpy2-2.0.8-cp36-cp36m-win_amd64) it won't work cause it will try to download the package from pypi repository:

    C:\Users\bobolafrite\Downloads>pip install gmpy2-2.0.8-cp36-cp36m-win_amd64
    
    Collecting gmpy2-2.0.8-cp36-cp36m-win_amd64
        Could not find a version that satisfies the requirement gmpy2-2.0.8-cp36-cp36m-win_amd64 (from versions: )
        No matching distribution found for gmpy2-2.0.8-cp36-cp36m-win_amd64
    

    But if you try with the extension (i,e : pip install gmpy2-2.0.8-cp36-cp36m-win_amd64.whl)

    C:\Users\bobolafrite\Downloads>pip install gmpy2-2.0.8-cp36-cp36m-win_amd64.whl
    
    Processing c:\users\bobolafrite\downloads\gmpy2-2.0.8-cp36-cp36m-win_amd64.whl
        Installing collected packages: gmpy2
        Successfully installed gmpy2-2.0.8