python - Spyder 无法从 Anaconda 3.4 加载

标签 python ubuntu anaconda spyder

我最近刚刚在全新的 Ubuntu 14.04 安装上安装了 Anaconda 3(适用于 Python 3.4)。

当我启动spyder IDE 时,我收到以下错误消息:

No module named 'version'
Traceback (most recent call last):
File "/home/daniel/anaconda3/bin/spyder", line 3, in <module>
start_app.main()
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/start_app.py",         line     91, in main
from spyderlib import spyder
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/spyder.py", line 158,  in <module>
from spyderlib.utils.environ import WinUserEnvDialog
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/utils/environ.py", line 17, in <module>
from spyderlib.widgets.dicteditor import DictEditor
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/widgets/dicteditor.py", line 28, in <module>
from spyderlib.utils.qthelpers import mimedata2url
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/utils/qthelpers.py", line 24, in <module>
from spyderlib.guiconfig import get_shortcut
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/guiconfig.py", line 24, in <module>
from spyderlib.widgets.sourcecode import syntaxhighlighters as sh
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/widgets/sourcecode/syntaxhighlighters.py", line 32, in <module>
required_version=PYGMENTS_REQVER)
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/dependencies.py", line 70, in add
installed_version)]
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/dependencies.py", line 32, in __init__
self.installed_version = programs.get_module_version(modname)
File "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/utils/programs.py", line 218, in get_module_version
mod = __import__(module_name)

File "/home/daniel/qiime_software/sphinx-1.0.4-release/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg/pygments/init.py", line 46 except TypeError, err: ^ SyntaxError: invalid syntax

我通过http://continuum.io/downloads#py34下载.sh文件安装了Conda 3.7然后通过终端使用“bash Anaconda3-2.1.0-Linux-x86_64.sh”安装它

可能是什么问题?

我可能已经发现了这个问题,但仍然需要一些帮助:

当我第一次安装 Ubuntu 时,我将 QIIME 放在这里(这是一套在自己的生物信息学环境中工作的程序)。

我看到在文件调用列表中,所有内容都来自 .../anaconda3/... 直到最后一行,从 .../qiime_software/... 错误地(?)调用了某些内容

我假设这是来自两个在其路径中包含 python 的软件套件...如何解决这个问题?当然,当我在终端中检查“which python”时,它(正确地)输出:

/home/daniel/anaconda3/bin/python

我几乎想到了这里提出的先前问题:Anaconda Spyder Qt library error on launch会引导我走上正确的道路,但我却走进了死胡同。

更新:

echo $PYTHONPATH 吐出:

/home/daniel/qiime_software/qiime-galaxy-0.0.1-repository-c2814c3c/lib/:/home/daniel/qiime_software/qiime-1.8.0-release/lib/python2.7/site-packages:/home/daniel/qiime_software/qiime-1.8.0-release/lib/:/home/daniel/qiime_software/matplotlib-1.3.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pprospector-1.0.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/tax2tree-1.0-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pynast- 1.2.2-release/lib/python2.7/site-packages:/home/daniel/qiime_software/emperor-0.9.3-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pycogent- 1.5.3-release/lib/python2.7/site-packages:/home/daniel/qiime_software/biom-format-1.3.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/ipython-latest-repository-184467d4/lib/python2.7/site-packages:/home/daniel/qiime_software/sphinx-1.0.4-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pyqi-0.3.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/MySQL-python-1.2.3-release/lib/python2.7/site-packages:/home/daniel/qiime_software/mpi4py-1.2.2-release/lib/python2.7/site-packages:/home/daniel/qiime_software/setuptools-0.6c11-release/lib/python2.7/site-packages:/home/daniel/qiime_software/gdata-2.0.17-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pysqlite-2.6.3-release/lib/python2.7/site-packages:/home/daniel/qiime_software/qcli-0.1.0-release/lib/python2.7/site-packages:/home/daniel/qiime_software/tornado-3.1.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/SQLAlchemy-0.7.1-release/lib/python2.7/site-packages:/home/daniel/qiime_software/pyzmq-2.1.11-release/lib/python2.7/site-packages:/home/daniel/qiime_software/numpy-1.7.1-release/lib/python2.7/site-packages:

感谢任何帮助。

最佳答案

Python 在环境变量 PYTHONPATH 中查找模块,因此请尝试在 shell 上echo $PYTHONPATH。通常,这应该是空的。

否则,您可以尝试从专用环境运行spyder,因此请尝试以下操作:

$ conda create -n spydertest spyder
$ source activate spydertest
$ spyder

关于python - Spyder 无法从 Anaconda 3.4 加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26271927/

相关文章:

Python:如何对两列进行分组?

python - PyTorch LSTM : RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. 在维度 1 中得到 1219 和 440

ubuntu - www-data 组中的用户无法查看目录

perl - 如何修复 anaconda 中的 Perl 未安装 bioperl 的问题? `Bailing out the installation for BioPerl-1.007002.`

Jupyter 中的 R 内核使用了错误的目录

python - Python 初学者

python - 如何使用 numpy 创建具有 N 种颜色的离散 RGB 颜色图

linux - 在 Linux 上生成特定的 CPU、磁盘和网络利用率工作负载

ubuntu - initctl : Unable to connect to Upstart: Failed to connect to socket/com/ubuntu/upstart: Connection refused

python - Anaconda 运行时错误 : Python is not installed as a framework?