在python错误中导入包

时间:2016-06-29 11:28:02

标签: linux python-2.7 ubuntu import path

在python中导入过程 -

Select label from table_name where value = '01';

libgsl.so.90路径是:

utina@utinax55:~$ python
Python 2.7.11+ (default, Apr 17 2016, 14:00:29) 
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/utina/.local/lib/python2.7/site-packages/lal/__init__.py", line 2, in <module>
    from .lal import *
  File "/home/utina/.local/lib/python2.7/site-packages/lal/lal.py", line 28, in <module>
    _lal = swig_import_helper()
  File "/home/utina/.local/lib/python2.7/site-packages/lal/lal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_lal', fp, pathname, description)
ImportError: libgsl.so.19: cannot open shared object file: No such file or directory
>>> exit

我的图书馆路径:

utina@utinax55:~$ locate libgsl
/usr/lib/i386-linux-gnu/libgsl.so.19
/usr/lib/i386-linux-gnu/libgsl.so.19.0.0
/usr/lib/i386-linux-gnu/libgslcblas.so.0
/usr/lib/i386-linux-gnu/libgslcblas.so.0.0.0
/usr/lib/x86_64-linux-gnu/libgsl.a
/usr/lib/x86_64-linux-gnu/libgsl.so
/usr/lib/x86_64-linux-gnu/libgsl.so.19
/usr/lib/x86_64-linux-gnu/libgsl.so.19.0.0
/usr/lib/x86_64-linux-gnu/libgslcblas.a
/usr/lib/x86_64-linux-gnu/libgslcblas.so
/usr/lib/x86_64-linux-gnu/libgslcblas.so.0
/usr/lib/x86_64-linux-gnu/libgslcblas.so.0.0.0
/usr/share/doc/libgsl-dbg
/usr/share/doc/libgsl-dev
/usr/share/doc/libgsl2
/usr/share/lintian/overrides/libgsl2
/var/cache/apt/archives/libgsl-dbg_2.1+dfsg-2_amd64.deb
/var/cache/apt/archives/libgsl-dev_2.1+dfsg-2_amd64.deb
/var/cache/apt/archives/libgsl2_2.1+dfsg-2_amd64.deb
/var/lib/dpkg/info/libgsl-dbg:amd64.list
/var/lib/dpkg/info/libgsl-dbg:amd64.md5sums

我尝试将此路径添加到utina@utinax55:~$ echo $LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/ 并运行&#34; /etc/ld.so.conf&#34;但是以前帖子中指定的这些更改并没有改变python中的导入错误。

我还指定我安装了libgsl依赖项,并且还使用synaptic包管理器安装了lal包。

0 个答案:

没有答案