当前位置: 代码迷 >> 综合 >> 在centos7上安装anaconda3遇到的问题
  详细解决方案

在centos7上安装anaconda3遇到的问题

热度:57   发布时间:2024-02-10 07:54:28.0

在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 <module>
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 <module>
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 <module>
from qtpy import QtWebEngineWidgets  # analysis:ignore
File "/home/dlou/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
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,可以正常启动。