无法让spyder使用python3(正确*)
我试图迁移到python3(参见从python2切换到python3 )继续;
试图用pip3安装spyder我到达了一个正常工作的工作区(虽然没有nautilus访问它,只能通过终端)。
更新系统然后重新启动它(由于某种未知原因)不再可访问; 在终端输入spyder会导致:
Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/qtpy/__init__.py", line 119, in from PySide import __version__ as PYSIDE_VERSION # analysis:ignore ImportError: No module named 'PySide' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/spyder", line 11, in sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/spyder/app/start.py", line 103, in main from spyder.app import mainwindow File "/usr/local/lib/python3.5/dist-packages/spyder/app/mainwindow.py", line 49, in requirements.check_qt() File "/usr/local/lib/python3.5/dist-packages/spyder/requirements.py", line 39, in check_qt import qtpy File "/usr/local/lib/python3.5/dist-packages/qtpy/__init__.py", line 125, in raise PythonQtError('No Qt bindings could be found')
然后,在我的系统进入spyder-free状态后,尝试使用apt-get安装spyder3:
sudo apt-get install spyder3
这导致了一个运行python 3的新spyder(版本2. *)。
问题是将其更新到版本3。*。
pip不识别任何’spyder3’所以我试过
pip3 install -U spyder
导致我的计算机上的另一个 spyder应用程序,尽管已更新; 那就是我可以
which spyder3; which spyder
并获得2个不同的位置,spyder3为v2。*,spyder为v3。*。
如果只有“正确”的spyder会出现在鹦鹉螺中 – 我可以忍受这种古怪,但它打开了“未更新的spyder”。
所以要总结一下:
- 选项A给了我一个非工作的spyder(并且没有通过nautilus访问)。
- 选项B给了我2个位于不同位置的工作spyder,1个版本2. *可以通过nautilus访问,另一个是版本3. *并且通过nautilus不可用。
我究竟做错了什么?…
用pip3安装spyder时; 需要PyQt4包:
sudo apt-get install python3-pyqt4
安装后给了我很想要的spyder IDE,在版本3和python3.5中工作。
当我用终端启动spyder时:
void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Project explorer" under id 124
但github上的post(有相当大的难度)让我放心: https : //github.com/spyder-ide/spyder/issues/3521