无法在Ubuntu 16.04上启动spyder3:即使安装了它们也缺少模块

时间:2018-02-04 01:37:29

标签: python ubuntu spyder

在Anaconda出现一系列问题后,我正试图在Ubuntu 16.04.3上设置机器学习和DNN的环境,而不使用Anaconda。 (主要是由于我的gpu计算能力为3.0,而且tensorflow的conda版本需要3.5的最小计算能力)。如果我直接使用python,我可以使用不同的tensorflow-1.5,最小值为3.0,并使用我的gpu。

在vanilla命令行上似乎所有东西都运行良好,但我想在Python 3.6中使用Spyder。

我安装了Spyder3 sudo apt-get install spyder3

这没关系,但是当我运行它时,即使我有模块,我也会错过模块错误:

$ spyder3
Traceback (most recent call last):
  File "/usr/bin/spyder3", line 3, in <module>
    start_app.main()
  File "/usr/lib/python3/dist-packages/spyderlib/start_app.py", line 114, in main
    from spyderlib import spyder
  File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 88, in <module>
    from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,
  File "/usr/lib/python3/dist-packages/spyderlib/qt/QtGui.py", line 13, in <module>
    from PySide.QtGui import *  # analysis:ignore
ModuleNotFoundError: No module named 'PySide.QtGui'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/spyder3", line 3, in <module>
    start_app.main()
  File "/usr/lib/python3/dist-packages/spyderlib/start_app.py", line 114, in main
    from spyderlib import spyder
  File "/usr/lib/python3/dist-packages/spyderlib/spyder.py", line 88, in <module>
    from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,
  File "/usr/lib/python3/dist-packages/spyderlib/qt/QtGui.py", line 13, in <module>
    from PySide.QtGui import *  # analysis:ignore
ModuleNotFoundError: No module named 'PySide.QtGui'

为python 2和3安装了这些模块:

$ sudo apt-get install python3-pyside.qtgui
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pyside.qtgui is already the newest version (1.2.2-2build2).

j$ sudo apt-get install python-pyside.qtgui
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-pyside.qtgui is already the newest version (1.2.2-2build2)

$ sudo apt-get install python3-apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-apt is already the newest version (1.1.0~beta1build1)


$ sudo apt-get install python-apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-apt is already the newest version (1.1.0~beta1build1)

有关如何让Spyder使用Python 3.6的任何建议吗?

0 个答案:

没有答案