2016-06-11 24 views
0

我收到以下错误试图在IPython的笔记本导入错误:没有模块的笔记本电脑和背景虚化在Windows中使用enthought

--------------------------------------------------------------------------- 
ImportError        Traceback (most recent call last) 
<ipython-input-128-bedfa82edaf4> in <module>() 
    9 p.line(logged_ts.index, logged_ts[[1]], color='navy', alpha=0.5) 
10 
---> 11 show(p) 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\bokeh\io.pyc in show(obj, browser, new) 
299 
300  ''' 
--> 301  return _show_with_state(obj, _state, browser, new) 
302 
303 def _show_with_state(obj, state, browser, new): 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\bokeh\io.pyc in _show_with_state(obj, state, browser, new) 
307 
308  if state.notebook: 
--> 309   comms_handle = _show_notebook_with_state(obj, state) 
310 
311  elif state.server_enabled: 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\bokeh\io.pyc in _show_notebook_with_state(obj, state) 
329   comms_target = make_id() 
330   publish_display_data({'text/html': notebook_div(obj, comms_target)}) 
--> 331   handle = _CommsHandle(get_comms(comms_target), state.document, state.document.to_json()) 
332   state.last_comms_handle = handle 
333   return handle 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\bokeh\util\notebook.pyc in get_comms(target_name) 
109 
110  ''' 
--> 111  from ipykernel.comm import Comm 
112  return Comm(target_name=target_name, data={}) 
113 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\ipykernel\__init__.py in <module>() 
    1 from ._version import version_info, __version__, kernel_protocol_version_info, kernel_protocol_version 
----> 2 from .connect import * 

C:\Users\user\AppData\Local\Enthought\Canopy\User\lib\site-packages\ipykernel\connect.py in <module>() 
12 
13 from IPython.core.profiledir import ProfileDir 
---> 14 from IPython.paths import get_ipython_dir 
15 from ipython_genutils.path import filefind 
16 from ipython_genutils.py3compat import str_to_bytes 

ImportError: No module named paths 

运行具有背景虚化的阴谋IPython中命名的路径我已经试过卸载IPython中使用pip和软件包管理器的软件包没有结果。 任何帮助将不胜感激,问候!

+1

'从IPython.paths进口get_ipython_dir'成功在我安装的Windows 7上的Canopy 1.7.2是否在您的环境中引用了其他Python安装?你可以通过运行'set |来检查在Windows命令提示符处进行排序。 –

+0

不是我记得。这是我得到的输出运行命令http://txt.do/5b27q – ghost

+0

什么版本的笔记本?也许你的笔记本版本太旧了? – bigreddot

回答

1

当您将pip与包管理器一起安装的软件包(包括与Canopy捆绑在一起的软件包)一起使用时,最终可能会得到不兼容的文件组合。我建议您卸载Canopy 1.5.2并安装当前版本1.7.2。在重新启动Canopy之前,请确保删除Canopy创建的其他目录。见https://support.enthought.com/entries/23580651-Uninstalling-and-resetting-Canopy

特别是(和你是否更新到1.7.2冠层),则需要重新启动雨棚前删除该目录:C:\Users\user\AppData\Local\Enthought\Canopy\User\

+0

是否有必要卸载并重新安装天蓬?我担心这意味着卸载软件包,我努力使它们在Windows中工作。如果我只重新启动Canopy并删除此建议的目录以解决路径问题,是否有机会? – ghost

+0

实际上是相反的。卸载并重新安装Canopy将不会对您的已安装软件包产生影响。删除该目录将删除所有这些包。所以,因为你确实想保留你手动安装的软件包,所以我建议不要删除它,而是尝试'enpkg --forceall ipython' –

相关问题