- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试安装这 2 个库(Cython_bbox 和 lap)时遇到了这些奇怪的错误,它们是我在运行 pip install -r requirements.txt
时需要的其他库的一部分。 ,
其中包含以下内容
yacs
opencv-python
PyYAML
cython-bbox
scipy
progress
motmetrics
matplotlib
lap
openpyxl
Pillow
tensorboardX
fvcore
这可以从以下链接中找到:
https://github.com/ifzhang/FairMOT
rc/cython_bbox.c:31:10: fatal error: Python.h: No such file or directory
31 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for cython-bbox
Running setup.py clean for cython-bbox
Building wheel for lap (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/aevas/Desktop/pyenvs/fairmotpy39/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dweujmo4/lap_14d06a4a011f45a69d78f1a214bd5715/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dweujmo4/lap_14d06a4a011f45a69d78f1a214bd5715/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-pzh48d16
cwd: /tmp/pip-install-dweujmo4/lap_14d06a4a011f45a69d78f1a214bd5715/
Complete output (34 lines):
Partial import of lap during the build process.
Generating cython files
running bdist_wheel
running build
running config_cc
running config_fc
running build_src
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/lap
copying lap/lapmod.py -> build/lib.linux-x86_64-3.9/lap
copying lap/__init__.py -> build/lib.linux-x86_64-3.9/lap
running build_ext
creating /tmp/tmpijpimqcg/home
creating /tmp/tmpijpimqcg/home/aevas
creating /tmp/tmpijpimqcg/home/aevas/Desktop
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/distutils
creating /tmp/tmpijpimqcg/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/distutils/checks
CCompilerOpt.generate_dispatch_header[2281] : dispatch header dir build/src.linux-x86_64-3.9/numpy/distutils/include does not exist, creating it
creating build/temp.linux-x86_64-3.9/lap
lap/_lapjv.cpp:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: Command "x86_64-linux-gnu-g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/core/include -Ilap -I/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/home/aevas/Desktop/pyenvs/fairmotpy39/include -I/usr/include/python3.9 -c lap/_lapjv.cpp -o build/temp.linux-x86_64-3.9/lap/_lapjv.o -MMD -MF build/temp.linux-x86_64-3.9/lap/_lapjv.o.d -msse -msse2 -msse3" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for lap
Running setup.py install for lap ... error
ERROR: Command errored out with exit status 1:
warnings.warn(
running build
running config_cc
running config_fc
running build_src
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/lap
copying lap/lapmod.py -> build/lib.linux-x86_64-3.9/lap
copying lap/__init__.py -> build/lib.linux-x86_64-3.9/lap
running build_ext
creating /tmp/tmplmbzif7h/home
creating /tmp/tmplmbzif7h/home/aevas
creating /tmp/tmplmbzif7h/home/aevas/Desktop
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/distutils
creating /tmp/tmplmbzif7h/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/distutils/checks
CCompilerOpt.generate_dispatch_header[2281] : dispatch header dir build/src.linux-x86_64-3.9/numpy/distutils/include does not exist, creating it
creating build/temp.linux-x86_64-3.9/lap
lap/_lapjv.cpp:4:10: fatal error: Python.h: No such file or directory
4 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: Command "x86_64-linux-gnu-g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-FZ7wim/python3.9-3.9.5=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/core/include -Ilap -I/home/aevas/Desktop/pyenvs/fairmotpy39/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/home/aevas/Desktop/pyenvs/fairmotpy39/include -I/usr/include/python3.9 -c lap/_lapjv.cpp -o build/temp.linux-x86_64-3.9/lap/_lapjv.o -MMD -MF build/temp.linux-x86_64-3.9/lap/_lapjv.o.d -msse -msse2 -msse3" failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1:
我将它安装在运行 python3.9 的全新虚拟环境中。我没有使用任何 conda 环境。
11th Gen Intel® Core™ i7-11850H @ 2.50GHz × 16
llvmpipe (LLVM 12.0.0, 256 bits) / Mesa Intel® UHD Graphics (TGL GT1)
Ubuntu 21.04 64-bit
我尝试过的事情
最佳答案
尝试这个 :
sudo apt install libpython3.9-dev
它将安装像 Python.h 这样的头文件
关于python - Cython_bbox 和 lap 安装错误,#include "Python.h"not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70516037/
我已经为这个问题烦恼了一段时间,我有一个计时器,它有 4 个按钮开始、停止、重置和圈数,当我调用 Stopwatch.start(); 时,Stopwatch.stop(); 或 Stopwatch.
我正在尝试检查我的程序是否正确分配内存 - 所以我有一系列不同类型的指针, pData1 = 0x844c458(malloc 的结果(5 * (double*) 的大小) pData2 = 0x84
安卓 我在表格的一行中有两个标签。我试图将这两个标签设置为垂直,但 firstLabel 与第二个标签重叠。因为 firstLabel 的高度是“auto”并且它包含动态文本,例如10 行,20 行。
我有一个在 Linx 中启动时运行的启动脚本: /etc/init/selfconfig #! /bin/sh # /etc/init.d/selfconfig USER=root HOME=/ro
我不明白我怎么能这样写查询 select * from product where name like 'Lap%' 在 Entity Framework 中 我的 dbcontext 是 dbFo
我在尝试安装这 2 个库(Cython_bbox 和 lap)时遇到了这些奇怪的错误,它们是我在运行 pip install -r requirements.txt 时需要的其他库的一部分。 , 其中
我已经 inherited一个相当古老的大而复杂的代码库,用于最初针对 MSDOS 的程序。事实证明,这个程序的某些部分是用一种叫做“Phar Lap 汇编程序”的 x86 汇编程序的晦涩方言编写的,
问题是:我的客户想要设置一个负载平衡的 wordpress 服务器来处理不断增加的访问者。 2 个 Web 服务器将具有以下设置: 负载平衡器 x 1 服务器 #1:Linux、Apache、PHP
The APIM is running 24/7 on my server, sometimes I have experienced below response. But in the ve
我是一名优秀的程序员,十分优秀!