【问题标题】:Spyder IDE won't start WinPython-64bit- 2.7.10.2Spyder IDE 无法启动 WinPython-64bit- 2.7.10.2
【发布时间】:2016-12-01 23:41:48
【问题描述】:

我一直在使用 Anaconda 发行版中提供的 Spyder IDE。出于某种原因,它无法启动我进行了几次卸载和重新安装,尝试从命令提示符启动它,但无济于事。我正在运行 Windows 8.1 64 位。我尝试安装 WinPython-64bit-2.7。当我尝试从命令提示符启动 spyder 时,我遇到了这个错误。

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'

【问题讨论】:

  • 您可能想查看this question
  • @iLoveTux 我确实读过它并没有帮助它只是给了我一个错误,即字符串没有 maketrans
  • hmm,其他一切似乎都是由于用户路径上的某些东西干扰了 python 标准库导入。从 Anaconda 的 Python 中检查时,sys.path 包含什么?
  • 在这里查看解决方案stackoverflow.com/questions/36337059/…

标签: python spyder


【解决方案1】:

对于 Winpython 部分,你可以试试这个:

点击“Winpython 命令提示符”

类型:

spyder --reset&amp;&amp;spyder

(可能需要最多两分钟,具体取决于您的计算机)

【讨论】:

  • 我在 Win10 上为 Python 3.6 使用 Spyder 3.2.8,现在 WinPython 目录中有一个 Spyder reset.exe 文件可以解决这些问题。
猜你喜欢
  • 2015-07-05
  • 2021-04-12
  • 2023-04-07
  • 2016-06-25
  • 2019-11-29
  • 2021-07-05
  • 2019-07-12
  • 2018-07-04
  • 1970-01-01
相关资源
最近更新 更多