Python无法显示行号(下)
安装 IDLEX
IDLEX 是 IDLE 的扩展增强版,项目地址http://idlex.sourceforge.net/about.html
下载后运行idlex.py 会弹出Dos 报错:
NameError: name 'channels' is not defined
错误全部信息如下:
Traceback (most recent call last):
File "C:\downloads\python\idlex-1.12\idlexlib\extensionManager.py", line 131,
in load_extension
mod = importlib.import_module('.' + fullname, package=__package__)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\downloads\python\idlex-1.12\idlexlib\extensions\IPyIDLE.py", line 253
, in class IdleXSubSocketChannel(SimpleChannel, channels.IOPubChannel):
NameError: name 'channels' is not defined
could not load IPyIDLE
* 出错原因是没安装IPython *
安装 setuptools
参考https://pypi.python.org/pypi/setuptools
在PowerShell中输入
> (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python -
C盘用户目录会出现安装包
> (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - --user
可以看到系统自动将setuptool-18.0.1安装到了 E:\python 所在目录中
这是因为在安装python时,已经在环境变量中加入了 E:\python
安装 IPython
直接在PowerShell中运行
pip install ipython
喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxwPjxjb2RlIGNsYXNzPQ=="language-python hljs ">再回过头来运行idlex.py ,弹出DOS 窗口出现新的错误
ImportError: IPython.kernel.zmq requires pyzmq >= 2.1.11
可以通过
在PowerShell中运行 pip install pyzmq 或者 easy_install pyzmq
Traceback (most recent call last):
File "E:\py_code\idlex-1.12\idlexlib\extensionManager.py", line 131, in load_e
xtension
mod = importlib.import_module('.' + fullname, package=__package__)
File "E:\Python\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "E:\py_code\idlex-1.12\idlexlib\extensions\IPyIDLE.py", line 253, in class IdleXSubSocketChannel(SimpleChannel, channels.IOPubChannel):
AttributeError: 'module' object has no attribute 'IOPubChannel'
http://www.dengb.com/xtzh/1032838.htmlwww.dengb.comtruehttp://www.dengb.com/xtzh/1032838.htmlTechArticlePython无法显示行号(下) 安装 IDLEX IDLEX 是 IDLE 的扩展增强版,项目地址http://idlex.sourceforge.net/about.html 下载后运行idlex.py 会弹出Dos 报错: Na...