melon_15
melon_15
采纳率75%
2017-05-03 15:44 阅读 14.2k

ubuntu下Anaconda下好了但是无法启动Spyder

Anaconda加入了环境变量了,
我用conda list看了是存在一个spyder的。
vim修改好了程序也能运行

但是终端下试图运行spyder都报错,看信息是缺了东西?但是我下载Anaconda的时候都没有改动原来的设定。

Traceback (most recent call last):
File "/root/anaconda2/bin/spyder", line 6, in
sys.exit(spyder.app.start.main())
File "/root/anaconda2/lib/python2.7/site-packages/spyder/app/start.py", line 103, in main
from spyder.app import mainwindow
File "/root/anaconda2/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 78, in
from qtpy.compat import from_qvariant
File "/root/anaconda2/lib/python2.7/site-packages/qtpy/compat.py", line 15, in
from .QtWidgets import QFileDialog
File "/root/anaconda2/lib/python2.7/site-packages/qtpy/QtWidgets.py", line 22, in
from PyQt5.QtWidgets import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

可转支付宝,谢谢!
更新:
=20170507=
Anaconda版本
谢谢大家看来我是缺了很多东西。
现在

  • pygt 更新 4.3.14-py27_0 --> 4.3.17-py27_0
  • libgl1-mesa-dev下载了最新版本12.0.6-0ubuntu0.16.04.1)
  • 再spyder也是报错信息变为

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: minimal, offscreen, xcb.
Reinstalling the application may fix this problem.

此外
再度apt-get install libgl1-mesa-dev或者apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
除了说已经安装最新,它会提示我有2个没用的可以卸载

The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic
linux-image-extra-4.4.0-31-generic
Use 'apt autoremove' to remove them.

不过我没敢动。多余的应该不影响?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

5条回答 默认 最新

  • devmiao devmiao 2017-05-03 16:01
  • oyljerry oyljerry 2017-05-03 23:36

    你依赖的so库文件找不到

     apt-get install libgl1-mesa-dev
    
    点赞 1 评论 复制链接分享
  • iamoyjj 欧阳嘉 2017-05-03 22:08

    首先你要明确你使用的Anaconda是什么版本?从堆栈看缺PyQt5这个包

    try to test

     import PyQt5
    PyQt5.QtWidgets.__file__
    

    try to install

     conda install pyqt
    
     or
    
     conda install pyqt=5 
    
     to specify your version
    
    点赞 评论 复制链接分享
  • Ton_min Ton_min 2018-01-24 10:37

    你好 请问一下你第一个问题 是怎么解决的
    ImportError: libGL.so.1: cannot open shared object file: No such file or directory

    点赞 评论 复制链接分享
  • mensanli mensanli 2019-09-29 17:21

    在安装了Spyder的环境下输入Spyder可以打开。默认是安装在base,环境下的

    点赞 评论 复制链接分享

相关推荐