安装python的包表时出错

2024-06-09 21:20:16 发布

您现在位置:Python中文网/ 问答频道 /正文

当我尝试为python构建包tables-3.1.1时,这就是问题所在:

sudo python setup.py build_ext --inplace
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
* Using Python 2.7.2 (default, Oct 11 2012, 20:14:37) 
* Found numpy 1.6.1 package installed.
* Found numexpr 2.4 package installed.
* Found Cython 0.20.2 package installed.
* Found HDF5 headers at ``/usr/local/include``, library at ``/usr/local/lib``.
* Found LZO 2 headers at ``/usr/local/include``, library at ``/usr/local/lib``.
* Skipping detection of LZO 1 since LZO 2 has already been found.
* Found bzip2 headers at ``/usr/local/include``, library at ``/usr/lib``.
/tmp/blosc_list_compressors0xPbk3.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^~~~
/tmp/blosc_list_compressors0xPbk3.c:2:5: warning: implicit declaration of function 'blosc_list_compressors' is invalid in C99 [-Wimplicit-function-declaration]
    blosc_list_compressors();
    ^
2 warnings generated.
ld: library not found for -lblosc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: library not found for -lblosc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
* Could not find blosc headers and library; using internal sources.
Setting compiler flag '-msse2'
running build_ext

我知道它找不到blosc库。我尝试在python中导入blosc:

^{pr2}$

所以,python可以找到blosc包。有人能帮我解决安装包装表的问题吗? 谢谢。在


Tags: installedtopackageincludelibusrlocallibrary
1条回答
网友
1楼 · 发布于 2024-06-09 21:20:16

您需要安装blosc开发库。如果您正在运行CentOS或Fedora,请尝试sudo yum install blosc-devel。对于Ubuntu,我找不到类似的包,这意味着您可能需要从源代码构建。There are tarballs here,你必须跟着{a2}。在

相关问题 更多 >