繁体   English   中英

为python安装软件包表时出错

[英]error when installing package tables for python

当我尝试为python构建包表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:

>>> import blosc
>>> help(blosc)

        ------
        TypeError
            If packed_array is not of type bytes or string.

        Examples
        --------

        >>> import numpy
        >>> a = numpy.arange(1e6)
        >>> parray = blosc.pack_array(a)
        >>> len(parray) < a.size*a.itemsize
        True
        >>> a2 = blosc.unpack_array(parray)
        >>> numpy.alltrue(a == a2)
        True

DATA
    __all__ = ['compress', 'compress_ptr', 'decompress', 'decompress_ptr',...
    __version__ = '1.2.4'

VERSION
    1.2.4

因此,python可以找到blosc软件包。 有人可以帮我解决安装打包表的问题吗? 谢谢你

您需要安装blosc开发库。 如果您正在运行CentOS或Fedora,请尝试sudo yum install blosc-devel 对于Ubuntu,我找不到类似的软件包,这意味着您可能必须从源代码进行构建。 这里有压缩包 ,您将必须遵循其构建说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM