python - ubuntu eric 没有模块 PyQt5.Qsci

标签 python qt ubuntu eric-ide

昨天刚刚安装了 Ubuntu 16.04 LTS,安装了 Eric。工作正常。今天想启动 Eric 并使用 qtdesigner,但没有成功(出现错误 qtdesigner not found),因为您必须根据指南手动安装它。现在经历了这个错误:

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 启动,因此没有找到这些包?

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

最佳答案

我有这个问题(ImportError:没有名为'PyQt5.Qsci'的模块),我通过以下步骤解决了它:

  1. 我打开终端并写了这条命令:pip3 install qscintilla
  2. 通过上面的命令我的电脑开始下载qscintilla包,下载完成后开始下载pyqt5和sip包。
  3. 在第 2 步之后我写了这个命令:sudo apt-get remove eric
  4. 然后我写了这个命令:sudo apt-get install eric
  5. 完成上述步骤后,我通过键入以下命令运行 eric:eric 并按 Enter;然后我的 eric 成功运行了。

关于python - ubuntu eric 没有模块 PyQt5.Qsci,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40573291/

相关文章:

python - 从 pandas 数据帧 : groupby or for loop? 中的行子集计算平均值

python - python - 不使用random.shuffle()随机化元组列表

c++ - undefined reference 错误

windows - 如何从两个(双引导)操作系统运行相同的 eclipse 安装?

docker build 命令占用了所有空间

Python 线程 - 创建子类?

python - 我的 modelformset_factory 没有保存图像(我使用了基于类的 View ),而是在使用管理端时保存它

c++ - 如何使用QpropertyAnimation制作SlideIn和SlideOut效果?

c++ - QTableView 禁用单列选择

ubuntu - 如何打开 rm 命令的警告?