2015-10-14 135 views
0

我一直在使用Spyder IDE在Anaconda的發行版中。出於某種原因,它只是不會啓動我做了一些卸載和重新安裝,試圖從命令提示符開始,但無濟於事。我運行Windows 8.1 64位。我嘗試安裝WinPython-64bit-2.7。當我嘗試從命令提示符啓動spyder時,我遇到了這個錯誤。Spyder IDE無法啓動WinPython-64bit-2.7.10.2

C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64>spyder.exe 
Splitting and Joining Strings 
Traceback (most recent call last): 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\runpy.py", line 162, 
in _run_module_as_main 
    "__main__", fname, loader, pkg_name) 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\runpy.py", line 72, 
in _run_code 
    exec code in run_globals 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\Scripts\spyder.exe\__mai 
n__.py", line 5, in <module> 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\site-packages\spyder 
lib\start_app.py", line 11, in <module> 
    from spyderlib.cli_options import get_options 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\site-packages\spyder 
lib\cli_options.py", line 7, in <module> 
    import optparse 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\optparse.py", line 7 
7, in <module> 
    import textwrap 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\textwrap.py", line 4 
0, in <module> 
    class TextWrapper: 
    File "C:\WinPython-64bit-2.7.10.2\python-2.7.10.amd64\lib\textwrap.py", line 8 
2, in TextWrapper 
    whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace)) 
AttributeError: 'module' object has no attribute 'maketrans' 


我的Spyder通的Python(X,Y),但工作時,我嘗試運行任何腳本,我在控制檯收到一條錯誤消息

Splitting and Joining Strings 
'import sitecustomize' failed; use -v for traceback 
Traceback (most recent call last): 
    File "D:\USC\RA\JSON to CSV\GP_apps_SQL-4 Sentiments.py", line 15, in <module> 
    import urllib2 
    File "C:\Python27\lib\urllib2.py", line 94, in <module> 
    import httplib 
    File "C:\Python27\lib\httplib.py", line 1241, in <module> 
    import ssl 
    File "C:\Python27\lib\ssl.py", line 90, in <module> 
    import textwrap 
    File "C:\Python27\lib\textwrap.py", line 40, in <module> 
    class TextWrapper: 
    File "C:\Python27\lib\textwrap.py", line 82, in TextWrapper 
    whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace)) 
AttributeError: 'module' object has no attribute 'maketrans' 
+0

你可能想看看[這個問題] (http://stackoverflow.com/questions/6628306/attributeerror-module-object-has-no-attribute-maketrans) – iLoveTux

+0

@iLoveTux我讀過,它並沒有幫助它只是給了我一個錯誤,字符串沒有maketrans – aamir23

+0

嗯,那裏的其他東西似乎是由某物造成的用戶路徑干擾Python標準庫導入。從Anaconda的Python中檢查時,'sys.path'包含了什麼? – iLoveTux

回答

0

對於Winpython部分,您可以試試這個:

點擊 「Winpython命令提示符」

類型:

spyder --reset&&spyder

(可能需要長達兩分鐘,這取決於您的計算機)