我正在尝试在虚拟 python 环境中使用 pip 安装 numba。我遇到以下错误:
错误日志:
cc: numba/cuda/cudadrv/_extras.c
cc -shared -lpthread -L/usr/local/lib -fstack-protector build/temp.freebsd-12.0-RELEASE-p2-amd64-3.6/numba/cuda/cudadrv/_extras.o -L/usr/local/lib -lpython3.6m -o build/lib.freebsd-12.0-RELEASE-p2-amd64-3.6/numba/cuda/cudadrv/_extras.so
building 'numba.npyufunc.omppool' extension
C compiler: cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC
compile options: '-I/home/russellb/py_devel/pyPlay/include -I/usr/local/include/python3.6m -c'
extra options: '-fopenmp -std=c++11'
cc: numba/npyufunc/omppool.cpp
cc: numba/npyufunc/gufunc_scheduler.cpp
numba/npyufunc/omppool.cpp:5:10: fatal error: 'omp.h' file not found
#include <omp.h>
^~~~~~~
1 error generated.
numba/npyufunc/omppool.cpp:5:10: fatal error: 'omp.h' file not found
#include <omp.h>
^~~~~~~
1 error generated.
error: Command "cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -I/home/russellb/py_devel/pyPlay/include -I/usr/local/include/python3.6m -c numba/npyufunc/omppool.cpp -o build/temp.freebsd-12.0-RELEASE-p2-amd64-3.6/numba/npyufunc/omppool.o -fopenmp -std=c++11" failed with exit status 1
非常感谢您对解决/解决此问题的任何帮助。我正在跑步FreeBSD 12和python3.6。我已将软链接llvm7作为默认设置,因为该信息会有所帮助。
我认为,makefile 正在寻找omp.h与实际位置不同的位置。如果是这样,有没有办法在pip安装过程中将路径作为参数传递?
一只名叫tom的猫
相关分类