简体   繁体   中英

Installing bigfloat, GMP and MPFR in windows for python

I am trying to install bigfloat in Python 3.2 on a Windows 7 machine. The documentation says that I first need to install GMP and MPFR. I have downloaded both of these to my desktop (as well as the bigfloat package). However as they are C packages I am not sure how to install them in python (I have tried to find a clear explanation for the last several hours and failed). Can any one either tell me what I need to do or point me to a tutorial? Thanks a lot, any help is greatly appreciated.

I'm afraid that you can't install it the way you have tried so far, simply because you need to compile the C files. Instead, what you can do is download from the unofficial binaries for windows:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Go the the site, and search for your packages. There are several versions of them, so make sure that you have the right versions for the Python that you're using.

There are two versions of gmpy - version 1 (aka gmpy) and version 2 (aka gmpy2). gmpy2 includes MPFR. If you install gmpy2 then you probably don't need bigfloat since the functionality of MPFR can be directly accessed from gmpy2.

Disclaimer: I maintain gmpy and gmpy2.

终于找到了解决方法..转到链接http://www.lfd.uci.edu/~gohlke/pythonlibs/#bigfloat获取正确安装的软件包(取决于32位或64位),转到命令提示符,键入\\ name_of_the_file .whl例如:C:\\ python27 \\ pip install bigfloat-0.3.0-cp27-none-win32.whl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM