0

我是付费用户,我在红帽服务器上安装了 Canopy 并配置了虚拟环境。在虚拟环境中,python 是环境中包含的一个:

    (User) $ which python
    ~/Enthought/Canopy_64bit/User/bin/python

但是当我无法从 python 导入“numpy”时:

    (User) $ python
    Enthought Canopy Python 2.7.3 | 64-bit | (default, Mar 25 2013, 15:55:17)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/__init__.py", line 148, in <module>
        import add_newdocs
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
        from numpy.lib import add_newdoc
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module>
        from polynomial import *
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/lib/polynomial.py", line 17, in <module>
        from numpy.linalg import eigvals, lstsq
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/linalg/__init__.py", line 48, in <module>
        from linalg import *
      File "/usr/lib/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 23, in <module>
        from numpy.linalg import lapack_lite
    **ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory**

我尝试使用 enpkg 更新 numpy,但在导入 numpy 时仍然出现上述错误。

    (User) $ enpkg numpy
    prefix: /home/wchen06/canopy_virtual
    MKL-10.3-1.egg                                                     [fetching]
     74.60 MB [.................................................................]
    numpy-1.6.1-5.egg                                                  [fetching]
      3.33 MB [.................................................................]
    MKL-10.3-1.egg                                                   [installing]
    248.04 MB [.................................................................]
    numpy-1.6.1-5.egg                                                [installing]
     11.20 MB [.................................................................]

请帮忙。

4

1 回答 1

1

这么晚才回复很抱歉!这是由于适用于 Linux 的 Canopy 1.0.0(测试版)中的一个错误造成的。有关解决方法,请参阅https://support.enthought.com/entries/21656595-ImportError-libmkl-intel-lp64-so-cannot-open-shared-object-file

于 2013-06-02T20:26:47.613 回答