请帮忙。
我想使用Enthought Python运行“ipython notebook”,但我无法这样做。
我已将Canopy设置为我的默认Python环境。 使用Canopy命令提示符,我可以运行Python,但不能运行iPython。
(Canopy 64bit) C:\>python
Enthought Canopy Python 2.7.3 | 64-bit | (default, Aug 8 2013, 05:30:12) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'2.7.3 | 64-bit | (default, Aug 8 2013, 05:30:12) [MSC v.1500 64 bit (AMD64)]'
>>> sys.executable
'C:\\Users\\CBrauer.BIGSUR\\AppData\\Local\\Enthought\\Canopy\\User\\Scripts\\python.exe'
>>> quit()
(Canopy 64bit) C:\>
(Canopy 64bit) C:\>ipython
Traceback (most recent call last):
File "C:\Users\CBrauer.BIGSUR\AppData\Local\Enthought\Canopy\User\Scripts\ipython-script.py", line 9,
in <module> load_entry_point('ipython==1.1.0', 'console_scripts', 'ipython')()
File "C:\Users\CBrauer.BIGSUR\AppData\Local\Enthought\Canopy\User\lib\site-packages\pkg_resources.py", line 345,
in load_entry_point return get_distribution(dist).load_entry_point(group, name)
File "C:\Users\CBrauer.BIGSUR\AppData\Local\Enthought\Canopy\User\lib\site-packages\pkg_resources.py", line 2380,
in l oad_entry_point raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'ipython') not found
我在Windows Server 2012 R2上安装了Enthought Python,我的PATH是:
(Canopy 64bit) C:\>path
PATH=C:\Users\CBrauer.BIGSUR\AppData\Local\Enthought\Canopy\User\Scripts;
C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;
C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;
C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Microsoft\Web Platform Installer\;
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;
S:\SQL Server (x86)\110\Tools\Binn\;
S:\SQL Server\110\Tools\Binn\;
S:\SQL Server\110\DTS\Binn\;
S:\SQL Server (x86)\110\Tools\Binn\ManagementStudio\;
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;
S:\SQL Server (x86)\110\DTS\Binn\;
c:\users\cbrauer.bigsur\appdata\local\enthought\canopy\user\scripts;
c:\program files (x86)\dtn\iqfeed;
c:\users\cbrauer.bigsur\appdata\local\enthought\canopy\system\scripts;
c:\users\cbrauer.bigsur\appdata\local\enthought\canopy\user\scripts;
c:\users\cbrauer.bigsur\appdata\local\enthought\canopy\user
(Canopy 64bit) C:\>
这是一个PATH问题吗?请指教。
查尔斯
答案 0 :(得分:0)
我遇到了同样的问题,并且能够通过删除ipython并重新安装它来解决它。我使用了以下命令(enpkg是Enthought的包管理器)
enpkg --remove ipython
enpkg ipython
我相信在我的情况下,我通过在安装顶篷后立即通过pip进行ipython更新来破坏它。
免责声明:上述内容适用于unix系统。我忽略了你在Windows系统上。一些谷歌搜索表明enpkg也可用于Windows,但我没有经验。
答案 1 :(得分:0)
我遇到了同样的问题(我正在使用Windows XP)。尝试了几个不同的东西后,最终偶然发现了Run菜单中的'InterruptKernel'选项。它似乎已经工作,我现在可以运行python脚本没有问题。