2014-10-03 60 views
0

在修改PATH變量以使某些庫安裝正常工作後,我發現使用%matplotlib魔術命令時,我的IPython Notebook(Ubuntu 14.04上的Enthought Canopy)會引發以下錯誤:GFORTRAN_1.4未找到

ImportError: /home/joe/Enthought/Canopy_64bit/User/bin/../lib/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3) 

我在嘗試安裝python-bio-formats,pims和pylibtiff時也遇到這個錯誤。

同樣,任何想法讚賞。

編輯:完整的錯誤回溯:

ImportError        Traceback (most recent call last) 
<ipython-input-1-3042faeb62d7> in <module>() 
----> 1 get_ipython().magic(u'matplotlib') 
     2 #import cv2 
     3 #import numpy as np 
     4 #import pandas as pd 
     5 #import os 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s) 
    2203   magic_name, _, magic_arg_s = arg_s.partition(' ') 
    2204   magic_name = magic_name.lstrip(prefilter.ESC_MAGIC) 
-> 2205   return self.run_line_magic(magic_name, magic_arg_s) 
    2206 
    2207  #------------------------------------------------------------------------- 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line) 
    2124     kwargs['local_ns'] = sys._getframe(stack_depth).f_locals 
    2125    with self.builtin_trap: 
-> 2126     result = fn(*args,**kwargs) 
    2127    return result 
    2128 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in matplotlib(self, line) 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k) 
    191  # but it's overkill for just that one bit of state. 
    192  def magic_deco(arg): 
--> 193   call = lambda f, *a, **k: f(*a, **k) 
    194 
    195   if callable(arg): 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in matplotlib(self, line) 
    78   """ 
    79   args = magic_arguments.parse_argstring(self.matplotlib, line) 
---> 80   gui, backend = self.shell.enable_matplotlib(args.gui) 
    81   self._show_matplotlib_backend(args.gui, backend) 
    82 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_matplotlib(self, gui) 
    2929   """ 
    2930   from IPython.core import pylabtools as pt 
-> 2931   gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select) 
    2932 
    2933   if gui != 'inline': 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in find_gui_and_backend(gui, gui_select) 
    250  """ 
    251 
--> 252  import matplotlib 
    253 
    254  if gui and gui != 'auto': 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/__init__.py in <module>() 
    177 # cbook must import matplotlib only within function 
    178 # definitions, so it is safe to import from it here. 
--> 179 from matplotlib.cbook import is_string_like 
    180 from matplotlib.compat import subprocess 
    181 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/cbook.py in <module>() 
    30 from weakref import ref, WeakKeyDictionary 
    31 
---> 32 import numpy as np 
    33 import numpy.ma as ma 
    34 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/__init__.pyc in <module>() 
    168   return loader(*packages, **options) 
    169 
--> 170  from . import add_newdocs 
    171  __all__ = ['add_newdocs', 
    172    'ModuleDeprecationWarning', 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/add_newdocs.py in <module>() 
    11 from __future__ import division, absolute_import, print_function 
    12 
---> 13 from numpy.lib import add_newdoc 
    14 
    15 ############################################################################### 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/__init__.py in <module>() 
    16 
    17 from . import scimath as emath 
---> 18 from .polynomial import * 
    19 #import convertcode 
    20 from .utils import * 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/polynomial.py in <module>() 
    17 from numpy.lib.function_base import trim_zeros, sort_complex 
    18 from numpy.lib.type_check import iscomplex, real, imag 
---> 19 from numpy.linalg import eigvals, lstsq, inv 
    20 
    21 class RankWarning(UserWarning): 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/__init__.py in <module>() 
    49 from .info import __doc__ 
    50 
---> 51 from .linalg import * 
    52 
    53 from numpy.testing import Tester 

/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/linalg.py in <module>() 
    27 ) 
    28 from numpy.lib import triu, asfarray 
---> 29 from numpy.linalg import lapack_lite, _umath_linalg 
    30 from numpy.matrixlib.defmatrix import matrix_power 
    31 from numpy.compat import asbytes 

ImportError: /home/joe/Enthought/Canopy_64bit/User/bin/../lib/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3) 

完整路徑(從回聲$ PATH):

/home/joe/Enthought/Canopy_64bit/User/bin: 
/home/joe/Enthought/Canopy_64bit/User/bin: 
/usr/local/sbin: 
/usr/local/bin: 
/usr/sbin: 
/usr/bin: 
/sbin: 
/bin: 
/usr/games: 
/usr/local/games 

的sys.path:

['', '/home/joe/Enthought/Canopy_64bit/User/src/svn', 
'/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pims', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python27.zip', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/plat-linux2', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/lib-tk', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/lib-old', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/lib-dynload', 
'/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages', 
'/home/joe/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/PIL', 
'/home/joe/opencv-2.4.9', 
'/home/joe/Canopy/appdata/canopy-1.4.1.1975.rh5-x86_64/lib/python2.7/site-packages'] 
+0

什麼是完整的錯誤追蹤,全路徑(格式良好的請),以及完整的sys.path(同上)? – 2014-10-05 11:24:55

+0

編輯爲包含完整回溯,PATH和sys.path輸出。 – JMarotta 2014-10-06 17:04:47

+0

'/ home/joe/opencv-2.4.9'如何進入?請搜索該目錄(及其子目錄)以查看是否有與fortran相關的任何內容。 – 2014-10-06 21:08:16

回答

0

我能解決這個按照此處列出的步驟(具體來說,步驟3-5)發生錯誤:https://support.enthought.com/entries/23580651-Uninstalling-and-resetting-Canopy

當使用pip重新嘗試安裝pim(https://github.com/soft-matter/pims)(命令:pip install --upgrade http://github.com/soft-matter/pims/zipball/master)時,問題能夠被複制。奇。

試圖通過其setup.py腳本安裝pylibtiff時,我也得到一個問題,但我會張貼此在另一個SO後,進一步詳細說明錯誤。

+1

中繼從構建專家評論:這是由用戶環境(PATH/LD_LIBRARY_PATH)引起的,而從源頭建立了一些套餐」,例如,請注意這裏怎麼numpy的反對在/ usr/lib目錄LAPACK鏈接,這是不Canopy的numpy情況。「 – 2014-11-25 15:41:02