本文介绍了ubuntu eric 没有模块 PyQt5.Qsci的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天刚安装了 Ubuntu 16.04 LTS,安装了 Eric.工作得很好.今天想启动 Eric 并使用 qtdesigner,但没有成功(找不到错误 qtdesigner),因为您必须根据指南手动安装它.现在经历了这个错误:

Just installed Ubuntu 16.04 LTS yesterday, installed Eric. Worked fine. Wanted to start Eric and use qtdesigner today, didn't work (got error qtdesigner not found) since you have to manually install it according to guides. Went through that now this error:

Error in sys.excepthook:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/usr/share/eric/modules/Utilities/__init__.py", line 61, in <module>
from PyQt5.Qsci import QSCINTILLA_VERSION_STR, QsciScintilla
ImportError: No module named 'PyQt5.Qsci'

Original exception was:
Traceback (most recent call last):
File "/usr/share/eric/modules/eric6.py", line 326, in <module>
main()
File "/usr/share/eric/modules/eric6.py", line 240, in main
import Preferences
File "/usr/share/eric/modules/Preferences/__init__.py", line 36, in  <module>
from PyQt5.QtWebKit import QWebSettings
ImportError: No module named 'PyQt5.QtWebKit'

我已经手动安装了 qscintilla、qt、pyqt、qtdesigner.我发现在 python3 下有包含 pyqt4 和 5(根据错误丢失的那些)的 distpackages,我可以在终端中运行 python3 时导入它们.如果我运行的是 Python 2,则无法导入.我假设 eric 使用 Python2 启动,因此找不到这些包?

I already manually installed qscintilla, qt, pyqt, qtdesigner. What I have found is that under python3 there are distpackages containing pyqt4 and 5 (the ones missing according to the error) and I can import them when running python3 in the terminal. If I am running Python 2 that import isn't possible.I am assuming that eric uses Python2 to start and thus does not find these packages?

我对 Linux 非常陌生,不知道我是否在正确的轨道上.我尝试了网络上提供的解决方案,但错误不断出现.有什么建议?

I am very new to Linux and do not know if I am on the right track. I tried the solutions offered on the web, but the error just keeps coming up. Any suggestions?

推荐答案

我遇到了这个问题(ImportError: No module named 'PyQt5.Qsci'),我通过以下步骤解决了:

I have this problem (ImportError: No module named 'PyQt5.Qsci') and I solved it by these steps:

  1. 我打开终端并写了这个命令:pip3 install qscintilla.
  2. 通过上面的命令我的电脑开始下载qscintilla包,下载后开始下载pyqt5和sip包.
  3. 在第 2 步之后我写了这个命令:sudo apt-get remove eric.
  4. 然后我写了这个命令:sudo apt-get install eric.
  5. 在上述步骤之后,我通过键入:eric 并按 Enter 来运行 eric;然后我的 eric 运行成功.
  1. I opened the terminal and wrote this command: pip3 install qscintilla.
  2. by above command my computer began to downloading qscintilla package, after downloading it start downloading pyqt5 and sip package.
  3. after step 2 I wrote this command: sudo apt-get remove eric.
  4. then I wrote this command: sudo apt-get install eric.
  5. after above steps I run eric by typing: eric and pressed Enter; then my eric ran successfully.

这篇关于ubuntu eric 没有模块 PyQt5.Qsci的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 10:48