Win7 环境下面是用 Anaconda 进行 python 开发,之前一直 ok ,昨天测试 TCP socket 程序时, spyder 异常报错,直接崩溃。尝试了官方提示的方法: spyder --reset spyder --show-console
出现如下错误提示: C:\Users\JacksonShawn>spyder --show-console Traceback (most recent call last): File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\spyderlib\spyder.py", line 2331, in main mainwindow = run_spyder(app, options, args) File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\spyderlib\spyder.py", line 2215, in run_spyder main.setup() File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\spyderlib\spyder.py", line 843, in setup from spyderlib.plugins.ipythonconsole import IPythonConsole File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\spyderlib\plugins\ipyt honconsole.py", line 40, in <module> from zmq.ssh import tunnel as zmqtunnel # analysis:ignore File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\zmq\ssh_init_.py", line 1, in <module> from zmq.ssh.tunnel import * File "C:\Users\JacksonShawn\Anaconda2\lib\site-packages\zmq\ssh\tunnel.py", li ne 21, in <module> from multiprocessing import Process File "multiprocessing.py", line 14, in <module> ImportError: cannot import name Process
我估计和前天写的程序有关,我将程序命名为了 multiprocessing.py ,编译自行过,会不会它把 Anaconda 包里面的自带 pyc 给覆盖了?如果是这样,我要怎样解决这个问题呢,向大家求助。
1
ruoyu0088 2016-09-16 11:26:39 +08:00
就是你说的问题, Python2 中你自己的程序不能和系统的模块重名。把你的模块换一个名字。
|
2
40huo 2016-09-16 11:29:33 +08:00
把你自己的那个 pyc 删掉, py 文件改个名,应该就好了。
|