在centos7上安装anaconda3遇到的问题

在CENTOS7上安装anaconda5.2.0的版本后,要启动spyder,但是出现错误,启动失败:

(base) [dlou@ks0512anaconda01 ~]$ spyder
Traceback (most recent call last):
  File "/home/dlou/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: libXss.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dlou/anaconda3/bin/spyder", line 11, in
    sys.exit(main())
  File "/home/dlou/anaconda3/lib/python3.6/site-packages/spyder/app/start.py", line 159, in main
    from spyder.app import mainwindow
  File "/home/dlou/anaconda3/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 92, in
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/home/dlou/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
 

处理方法:

从网上下载以下安装包:

PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl

PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl

安装PyQt5的时候提示需要PyQt5_sip,因此又下载了以下安装包:

PyQt5_sip-4.19.19-cp36-cp36m-manylinux1_x86_64.whl

 

依次安装:

(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQt5_sip-4.19.19-cp36-cp36m-manylinux1_x86_64.whl 
Processing ./PyQt5_sip-4.19.19-cp36-cp36m-manylinux1_x86_64.whl
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: PyQt5-sip
Successfully installed PyQt5-sip-4.19.19
(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl 
Processing ./PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in /home/dlou/anaconda3/lib/python3.6/site-packages (from PyQt5==5.12.1) (4.19.19)
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: PyQt5
Successfully installed PyQt5-5.12.1
(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl 
Processing ./PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Requirement already satisfied: PyQt5>=5.12 in /home/dlou/anaconda3/lib/python3.6/site-packages (from PyQtWebEngine==5.12.1) (5.12.1)
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in /home/dlou/anaconda3/lib/python3.6/site-packages (from PyQt5>=5.12->PyQtWebEngine==5.12.1) (4.19.19)
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: PyQtWebEngine
Successfully installed PyQtWebEngine-5.12.1
 

虽然有错误提示,执行spyder,可以正常启动。

 

 

 

今天重新安装了最新的anaconda,非常顺利,安装包也略有更换。

Anaconda3-2020.07-Linux-x86_64.sh

PyQt5_sip-4.19.19-cp38-cp38-manylinux1_x86_64.whl

PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl

PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl

 

安装log如下:

(base) [dlou@ks0512anaconda01 ~]$ python
Python 3.8.3 (default, Jul  2 2020, 16:21:59) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
[5]+  Stopped                 python
(base) [dlou@ks0512anaconda01 ~]$ cd Downloads/
(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQt5_sip-4.19.19-cp38-cp38-manylinux1_x86_64.whl 
Processing ./PyQt5_sip-4.19.19-cp38-cp38-manylinux1_x86_64.whl
Installing collected packages: PyQt5-sip
Successfully installed PyQt5-sip-4.19.19
(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl 
Processing ./PyQt5-5.12.1-5.12.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in /home/dlou/anaconda3/lib/python3.8/site-packages (from PyQt5==5.12.1) (4.19.19)
ERROR: spyder 4.1.4 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
Installing collected packages: PyQt5
Successfully installed PyQt5-5.12.1

(base) [dlou@ks0512anaconda01 Downloads]$ 
(base) [dlou@ks0512anaconda01 Downloads]$ pip install PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl 
Processing ./PyQtWebEngine-5.12.1-5.12.9-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Requirement already satisfied: PyQt5>=5.12 in /home/dlou/anaconda3/lib/python3.8/site-packages (from PyQtWebEngine==5.12.1) (5.12.1)
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.14 in /home/dlou/anaconda3/lib/python3.8/site-packages (from PyQt5>=5.12->PyQtWebEngine==5.12.1) (4.19.19)
Installing collected packages: PyQtWebEngine
Successfully installed PyQtWebEngine-5.12.1
(base) [dlou@ks0512anaconda01 Downloads]$ spyder
spyder启动正常。


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部