使用预编译的二进制文件在 windows 上安装 gmpy2

Installing gmpy2 on windows using pre-compiled binaries

我正在尝试安装 gmpy2 包作为 PHE 包的要求。如“", I have tried to install it via pre-compliled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/.

中所建议

但是当我尝试通过

安装它时

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

我得到以下结果:

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): (...)

http://www.lfd.uci.edu/~gohlke/pythonlibs/下载的文件保存为zip文件有问题吗?

我在 Win10 上使用 Python 3.6.3。

如果您在不指定文件扩展名的情况下尝试安装 (i,e : pip install gmpy2-2.0.8-cp36-cp36m-win_amd64),它将无法正常工作,因为它会尝试从pypi 存储库:

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

但如果您尝试使用扩展名 (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