无法在Heroku上部署Flask应用程序[致命错误:mpfr.h:没有这样的文件或目录]

问题描述 投票:0回答:2

我已经使用Flask制作了简单的Web应用,并希望将其部署在Heroku上,但是在部署时发现了此错误:

       Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yc_idc80/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-dh_wvxtt-record/install-record.txt --single-version-externally-managed --compile:
       running install
       running build
       running build_ext
       building 'gmpy2' extension
       creating build
       creating build/temp.linux-x86_64-3.6
       creating build/temp.linux-x86_64-3.6/src
       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITHMPFR -DWITHMPC -I/app/.heroku/python/include/python3.6m -c src/gmpy2.c -o build/temp.linux-x86_64-3.6/src/gmpy2.o
       In file included from src/gmpy2.c:426:0:
       src/gmpy.h:252:20: fatal error: mpfr.h: No such file or directory
       compilation terminated.
       error: command 'gcc' failed with exit status 1  
       ----------------------------------------
python heroku flask
2个回答
0
投票

我在gmpy2上遇到了同样的问题,今天我解决了:


0
投票

该解决方案对您有用吗?有同样的问题。

© www.soinside.com 2019 - 2024. All rights reserved.