0
嗨,我很新的python。我使用Navigator(anaconda launcher)编码spyder。 我已经创建了一个名为“约翰”一个新的虚拟环境,并在终端使用下列命令安装了一些软件包:Spyder不能在新的虚拟环境中打开
conda create -n john python=2.7 anaconda
source activate john
conda install -n john -c akode lasagne=0.1dev
conda install -n john -c derickl nolearn=0.5b1
然后我试图打开Spyder的,并通过在终端输入“Spyder的”运行代码和这是我得到的错误:
Traceback (most recent call last):
File "/Users/Hengameh/anaconda2/envs/john/bin/spyder", line 3, in <module>
start_app.main()
File "/Users/Hengameh/anaconda2/envs/john/lib/python2.7/site- packages/spyderlib/start_app.py", line 114, in main
from spyderlib import spyder
File "/Users/Hengameh/anaconda2/envs/john/lib/python2.7/site- packages/spyderlib/spyder.py", line 88, in <module>
from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,
File "/Users/Hengameh/anaconda2/envs/john/lib/python2.7/site- packages/spyderlib/qt/QtGui.py", line 10, in <module>
from PyQt4.Qt import QKeySequence, QTextCursor # analysis:ignore
ImportError: cannot import name QKeySequence
而且当我尝试打开它崩溃和不开放的约翰·环境相关的导航器发射。
现在有趣的部分是与默认根环境相关联的导航器启动器打开时没有任何问题,而根环境中的spyder也是如此。
任何想法如何使其工作或为什么这样做? ID真的很感谢你的帮助:))
你有没有试过在你的virtualenv里面安装Spyder?如果它不在virtualenv中,那么将调用安装在你的根env中的'spyder'。 – patricktokeeffe