2017-09-26 239 views
1

我试图安装bigfloat,我收到这个消息,似乎表明我需要首先使用mpfr库。我该怎么做呢?
消息:如何在pythonanywhere上安装GNU MPFR库

running build_ext building 'mpfr' extension creating build/temp.linux-x86_64-2.7 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c mpfr. c -o build/temp.linux-x86_64-2.7/mpfr.o mpfr.c:344:18: fatal error: mpfr.h: No such file or directory #include "mpfr.h"^compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我很新的蟒蛇和pythonanywhere,所以我不知道如何安装库。

我试图找到如何使用谷歌安装一个图书馆,我试图用:

pip install --user mpfr 

但我收到此错误信息:

Collecting mpfr Could not find a version that satisfies the requirement mpfr (from versions:) No matching distribution found for mpfr

+0

什么是错误信息?你有什么尝试? – SherylHohman

+1

消息:运行build_ext建立'mpfr'扩展创建build/temp.linux-x86_64-2.7 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c mpfr。 c -o build/temp.linux-x86_64-2.7/mpfr.o mpfr.c:344:18:致命错误:mpfr.h:没有这样的文件或目录#include“mpfr.h”^编译终止。错误:命令'x86_64-linux-gnu-gcc'失败,退出状态1我很新的python和pythonanywhere,所以我不知道如何安装库。 – vexgr1999

+1

我试图鳍如何安装使用谷歌图书馆,我试图使用:pip安装 - 用户mpfr但我收到此错误消息: 收集mpfr 找不到满足要求的版本mpfr(从版本: ) 找不到与mpfr匹配的分配 – vexgr1999

回答

1

gmpy2用C语言编写,并取决于另外三个C库:GMP,MPFR和MPC。确保所有依赖关系存在的最简单方法是使用Linux发行版中的标准软件包管理工具“libmpc-dev”。