Python 无法显示行号(下)
2015-07-14 21:19
821 查看
安装 IDLEX
IDLEX 是 IDLE 的扩展增强版,项目地址http://idlex.sourceforge.net/about.html下载后运行
idlex.py会弹出
Dos报错:
[code]NameError: name 'channels' is not defined
错误全部信息如下:
[code]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 <module> class IdleXSubSocketChannel(SimpleChannel, channels.IOPubChannel): NameError: name 'channels' is not defined could not load IPyIDLE
* 出错原因是没安装
IPython*
安装 setuptools
参考https://pypi.python.org/pypi/setuptools在
PowerShell中输入
[code]> (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python -
C盘用户目录会出现安装包
[code]> (Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - --user
可以看到系统自动将
setuptool-18.0.1安装到了
E:\python所在目录中
这是因为在安装
python时,已经在环境变量中加入了
E:\python
安装 IPython
直接在PowerShell中运行
[code]pip install ipython
再回过头来运行
idlex.py,弹出DOS 窗口出现新的错误
[code]ImportError: IPython.kernel.zmq requires pyzmq >= 2.1.11
可以通过
在
PowerShell中运行
pip install pyzmq或者
easy_install pyzmq
[code]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 <mod ule> class IdleXSubSocketChannel(SimpleChannel, channels.IOPubChannel): AttributeError: 'module' object has no attribute 'IOPubChannel'
相关文章推荐
- Python中time,datetime模块的常见使用方法
- python基础教程总结5——函数
- python import 的陷阱
- python import 包导入的陷阱
- Python Idle 无法显示行号(上)
- The C Programming Language Example and Python Implemented
- Python Security 之 端口扫描
- 图解Python深拷贝和浅拷贝
- 学习Python
- Python基础之变量类型
- Python日志输出——logging模块
- python 区分图像大小(A2、A3、A4)
- python基础教程总结4—基本语句
- 关于liaoxuefeng的python3教程实战第四天
- Python下opencv使用笔记(九)(图像直方图)
- Python监控进程性能数据并绘图保存为PDF文档
- python tornado 搭建webServer
- 实现Python虚拟按键解决getch()的自动化测试问题
- Python 背景色与语法高亮主题配置
- install ipython & notebook