2016-11-13 67 views
0

昨天安裝了Ubuntu 16.04 LTS,安裝了Eric。工作很好。想要啓動Eric並今天使用qtdesigner,沒有工作(得到錯誤qtdesigner找不到),因爲您必須根據指南手動安裝它。現在通過這個錯誤:Ubuntu的eric無模塊PyQt5.Qsci

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下有distpackages包含pyqt4和5(根據錯誤丟失的),我可以在終端中運行python3時導入它們。如果我正在運行Python 2,導入是不可能的。 我假設eric使用Python2啓動,因此沒有找到這些包?

我對Linux很新,不知道我是否在正確的軌道上。我嘗試了網絡上提供的解決方案,但錯誤只是不斷出現。有什麼建議麼?

+0

什麼版本的Qt,你運行的python2 ...用'從PyQt5.QtCore進口QT_VERSION_STR' – danidee

+0

這是我的Python下得到:從PyQt5.QtCore進口QT_VERSION_STR 回溯(最近通話最後一個): 文件「」,1號線,在 導入錯誤:沒有名爲PyQt5.QtCore – Kalv

+0

模塊嗯....那麼看來你沒有安裝python2 – danidee

回答

1

我有這個問題(導入錯誤:沒有模塊名爲「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成功運行。
+0

卸載並重新安裝似乎沒有必要。 – JohnJohn

0

只需按照Eric的下載頁面中的說明,並確保在執行install.py腳本中使用python3。

從Eric6技術報告

Compatibility with Python ver. 3 or/and 2 From the current ver. 6, this same Eric IDE is fully Python 3 or/and 2 compatible, both considered as an executing program and as a developing environment. Indeed this same unique Eric IDE can be used with Python ver. 3 only, OR Python ver. 2 only, or Python ver. 3 AND ver. 2, together. This way offering a unique environment where to attenuate the inconveniences caused by such odd incompatibility between these two consecutive Python versions, and possibly easing the transition between them. That said, we have here decided to adopt and use Python ver. 3—and the consequently related accessories, such as primarily the related PyQt library—as the only base language for this Report 1 , and that for manifest reasons of manageability. Giving thus for granted that a fool-proof compatibility should be experienced in case of adoption of Python ver. 2.

相關問題