启动spyder后,“导入sitecustomize”失败
我正在尝试安装python。或者实际上,已经安装并卸载了几次。我在spyder
IDE中使用pythonxy(我习惯使用matlab就是为什么要使用spyder)。在我的win8机器上,3.3.2
python甚至都不以spyder开头,所以现在我安装了2.7版本。
Spyder现在启动,但是在启动时,我得到“导入sitecustomize”失败吗?在我的控制台和python中不会执行我输入的任何命令。发生错误后,startupscript会一直持续进行而无需执行任何操作,我也无法执行任何操作。该错误告诉我使用-
v附录启动python,输出如下。
我已经用谷歌搜索了这个错误,这给了我两个可能的解决方案:我应该编辑python.rb
https://github.com/mxcl/homebrew/commit/10ba101c323f98118b427f291e15abc5b3732991
或我应该将此(附加在那里的最后一篇文章)应用于sitecustomize https:/
/code.google.com/p/spyderlib/issues/detail?id=771
应用差异文件无济于事,正如mata所述,在安装过程中会使用.rb文件,因此不适用于我的问题。
所以我的问题是:有人从经验中知道如何解决此错误吗?
错误:
'import sitecustomize' failed; use -v for traceback
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
追溯:
C:\Python27\lib\site-packages\spyderlib\pil_patch.pyc matches C:\Python27\lib\site-packages\spyderlib\pil_patch.py
import spyderlib.pil_patch # precompiled from C:\Python27\lib\site-packages\spyderlib\pil_patch.pyc
Traceback (most recent call last):
File "C:\Python27\lib\site.py", line 498, in execsitecustomize
import sitecustomize
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 174, in <module>
os.environ["SPYDER_AR_STATE"].lower() == "true")
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\monitor.py", line 146, in __init__
self.n_request.connect( (host, notification_port) )
File "C:\Python27\lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.