python 'bigfloat' package installation issues

本秂侑毒 提交于 2019-11-30 10:51:24

When I compile private versions of GMP, MPFR, and MPC on Linux, I use:

# Create the desired destination directory for GMP, MPFR, and MPC.
$ mkdir /home/case/local
# Download and un-tar the GMP source code. Change to GMP source directory and compile GMP.
$ cd ~/src/gmp-5.1.0
$ ./configure --prefix=/home/case/local
$ make
$ make check
$ make install
# Download and un-tar the MPFR source code. Change to MPFR source directory and compile MPFR.
$ cd ~/src/mpfr-3.1.1
$ ./configure --prefix=/home/case/local --with-gmp=/home/case/local
$ make
$ make check
$ make install
# Download and un-tar the MPC source code. Change to MPC source directory and compile MPC.
$ cd ~/src/mpc-1.0.1
$ ./configure --prefix=/home/case/local --with-gmp=/home/case/local --with-mpfr=/home/case/local
$ make
$ make check
$ make install

I think those instructions will work on OSX, too.

Update

I successfully build bigfloat using the command:

py27 setup.py build_ext -I/home/case/local/include -L/home/case/local/lib -R/home/case/local/lib install

Just in case anyone else comes across this page while trying to install bigfloat with pip on Mac OS X, here are the commands I had to use to get it to install correctly:

brew install gmp
brew install mpfr
sudo pip install --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" bigfloat

This method requires that you have homebrew installed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!