Posts 安装polygon出错的解决经过:fatal error: limits.h: 没有那个文件或目录
Post
Cancel

安装polygon出错的解决经过:fatal error: limits.h: 没有那个文件或目录

按照官方的说明,先 下载 程序,然后解压

1
2
tar -zxvpf polynote-dist.tar.gz
cd polynote

再安装依赖项

1
pip3 install -r ./requirements.txt

在安装jep包的时候报错

    gcc -pthread -B /usr/local/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPACKAGE=jep -DUSE_DEALLOC=1 -DJEP_NUMPY_ENABLED=1 -DVERSION="3.9.1" -DPYTHON_LDLIBRARY="libpython3.8.so" -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux -Isrc/main/c/Include -Ibuild/include -I/usr/local/anaconda3/lib/python3.8/site-packages/numpy/core/include -I/usr/local/anaconda3/include/python3.8 -c src/main/c/Objects/pyjarray.c -o build/temp.linux-x86_64-3.8/src/main/c/Objects/pyjarray.o
    In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:7:0,
                     from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:34,
                     from /usr/local/anaconda3/include/python3.8/Python.h:11,
                     from src/main/c/Include/jep_platform.h:35,
                     from src/main/c/Include/Jep.h:35,
                     from src/main/c/Objects/pyjarray.c:33:
    /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:168:61: fatal error: limits.h: 没有那个文件或目录
     #include_next <limits.h>  /* recurse down to the real one */
                                                                 ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ebwvm8dg/jep_2c0724e243c04e0eafcee50568559c9e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ebwvm8dg/jep_2c0724e243c04e0eafcee50568559c9e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hkkdkw2c/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda3/include/python3.8/jep Check the logs for full command output.

找了一圈,尝试安装各种gcc有关的库,都没有解决,最后尝试通过conda安装

先尝试

1
conda install jep==3.9.*

安装提示找不到,可能因为我更换成了国内源的原因,最后按提示去https://anaconda.org/ 搜jep包,在这里找到安装命令 https://anaconda.org/conda-forge/jep

1
conda install -c conda-forge jep==3.9.*

顺利解决,并自动安装了open-jdk等依赖的项目。


邀请您关注我的公众号,我将会不时地为您推送独家原创的技术内容分享。
This post is licensed under CC BY 4.0 by the author.

Trending Tags