gpt4 book ai didi

linux - 在 Ubuntu 20.04 上使用 Pip 安装 pandas_profiling 时出错

转载 作者:行者123 更新时间:2023-12-04 19:06:37 25 4
gpt4 key购买 nike

pip install pandas_profiling


失败于

Running setup.py install for Bottleneck ... errorERROR: Command errored out with exit status 1:command: /home/me/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/setup.py'"'"'; file='"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/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-pgrmqqqd/install-record.txt --single-version-externally-managed --compile --install-headers /home/me/venv/include/site/python3.9/Bottleneckcwd: /tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/Complete output (15 lines):running installrunning buildrunning build_pyrunning build_extbuilding 'bottleneck.reduce' extensioncreating build/temp.linux-x86_64-3.9creating build/temp.linux-x86_64-3.9/bottleneckcreating build/temp.linux-x86_64-3.9/bottleneck/srcx86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/me/venv/lib/python3.9/site-packages/numpy/core/include -I/home/me/venv/include -I/usr/include/python3.9 -c bottleneck/src/reduce.c -o build/temp.linux-x86_64-3.9/bottleneck/src/reduce.o -O2In file included from bottleneck/src/reduce.c:1:bottleneck/src/bottleneck.h:4:10: fatal error: Python.h: No such file or directory4 | #include <Python.h>| ^~~~~~~~~~compilation terminated.error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1----------------------------------------ERROR: Command errored out with exit status 1: /home/me/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/setup.py'"'"'; file='"'"'/tmp/pip-install-u7f_8_0k/bottleneck_1375337c49c246109b2e650965628211/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-pgrmqqqd/install-record.txt --single-version-externally-managed --compile --install-headers /home/me/venv/include/site/python3.9/Bottleneck Check the logs for full command output.


我在 Ubuntu 20.04 上,我的 python 版本是-

Python 3.9.0+


我尝试单独安装瓶颈,

pip install Bottleneck --no-cache-dir


但这也给出了同样的错误。已查看相关主题的解决方案,

fatal error: Python.h: No such file or directory


setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for bottleneck error


但没有运气。任何帮助,将不胜感激。

最佳答案

所以..最后这就是让它工作的原因......必须安装python3.9-dev。

关于linux - 在 Ubuntu 20.04 上使用 Pip 安装 pandas_profiling 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67680452/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com