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等依赖的项目。


真诚邀请您走进我的知识小宇宙,关注我个人的公众号,在这里,我将不时为您献上独家原创且极具价值的技术内容分享。每一次推送,都倾注了我对技术领域的独特见解与实战心得,旨在与您共享成长过程中的每一份收获和感悟。您的关注和支持,是我持续提供优质内容的最大动力,让我们在学习的道路上并肩同行,共同进步,一起书写精彩的成长篇章!

AI文字转语音
AI个性头像生成
This post is licensed under CC BY 4.0 by the author.

Trending Tags