使用Enthought Canopy导入错误

时间:2014-10-01 15:45:04

标签: enthought

我最近注定了最新版本的Enthought Canopy(Python 2.7x)。我有一些python代码,一个月前使用较旧版本的Enthought Canopy工作。现在我收到与测试相关的错误消息,并在我使用“import”时进行检查。完全相同的代码适用于Anaconda Spyder,因此我的代码中没有任何变化。我确信在较新版本的Canopy中有些内容已被更改,但Enthought人员不会与我交谈(我是一名免费的学术用户)。我是一个“数字计算器”而不是Python专家。我很感激你能给我的任何帮助。我正在使用OS X 10.8.5的Macbook Pro。我正在使用Canopy版本1.4.1(64位)。

以下是代码的导入部分(与“import”命令相同的错误): import numba

以下是错误消息:

Welcome to Canopy's interactive data-analysis environment!
 with pylab-backend set to: inline
Type '?' for more information.

In [1]: %run "/Users/kgilbert/Desktop/python2.7Nov2013/FourierPE/Fourier_PE _ORIGINAL2 copy.py"
---------------------------------------------------------------------------
UnsupportedOperation                      Traceback (most recent call last)
/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    202             else:
    203                 filename = fname
--> 204             __builtin__.execfile(filename, *where)

/Users/kgilbert/Desktop/python2.7Nov2013/FourierPE/Fourier_PE _ORIGINAL2 copy.py in <module>()
     36 '''
     37 
---> 38 import numba
     39 import FiniteDifferencePE_modules
     40 import FourierPE_modules

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/__init__.py in <module>()
      4 from __future__ import print_function, division, absolute_import
      5 import re
----> 6 from . import testing, decorators
      7 from ._version import get_versions
      8 from . import special, types, config

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/testing.py in <module>()
      5 import numba.unittest_support as unittest
      6 
----> 7 from numba.tests import NumbaTestProgram
      8 from numba.utils import StringIO
      9 

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/tests/__init__.py in <module>()
    175     pass
    176 else:
--> 177     faulthandler.enable()

/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/IPython/kernel/zmq/iostream.pyc in fileno(self)
    174 
    175     def fileno(self):
--> 176         raise UnsupportedOperation("IOStream has no fileno.")
    177 
    178     def write(self, string):

UnsupportedOperation: IOStream has no file no.

以下新产品

Canopy现在有numba版本0.14.0-1以下是错误消息:%run“/Users/kgilbert/Desktop/python2.7Nov2013/FourierPE/Fourier_PE _ORIGINAL2 copy.py”

AttributeError Traceback(最近一次调用最后一次) execfile中的/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/IPython/utils/py3compat.pyc(fname,* where)     202其他:     203 filename = fname - &GT; 204 内置 .execfile(文件名,* where)

/Users/kgilbert/Desktop/python2.7Nov2013/FourierPE/Fourier_PE _ORIGINAL2 copy.py in()      36'''      37 ---&GT; 38进口numba      39 import FiniteDifferencePE_modules      40导入FourierPE_modules

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/ init .py in()       4来自 future import print_function,division,absolute_import       5导入重新 ----&GT; 6来自。进口测试,装饰器       7来自._version导入get_versions       8来自。 import special,types,config

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/testing.py in()       3导入contextlib       4 ----&GT; 5导入numba.unittest_support作为unittest       6       7来自numba.tests导入NumbaTestProgram

AttributeError:'module'对象没有属性'unittest_support'

问题:当你从IPYTHON进口数字时会发生什么 答案:我收到上面的第一个错误信息(在此提供) 欢迎来到Canopy的交互式数据分析环境!  将pylab-backend设置为:inline 输入'?'了解更多信息。

在[1]中:导入numba

UnsupportedOperation Traceback(最近一次调用最后一次)  in() ----&GT; 1导入numba

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/ init .py in()       4来自 future import print_function,division,absolute_import       5导入重新 ----&GT; 6来自。进口测试,装饰器       7来自._version导入get_versions       8来自。 import special,types,config

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/testing.py in()       5导入numba.unittest_support作为unittest       6 ----&GT; 7来自numba.tests导入NumbaTestProgram       8来自numba.utils import StringIO       9

/Users/kgilbert/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numba/tests/ init .py in()     175传球     176其他: - &GT; 177 faulthandler.enable()

fileno中的

/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/IPython/kernel/zmq/iostream.pyc(自)     174     175 def fileno(self): - &GT; 176引发UnsupportedOperation(“IOStream没有fileno。”)     177     178 def write(self,string):

UnsupportedOperation:IOStream没有fileno。

在[2]中:

0 个答案:

没有答案