站內搜尋:Yahoo搜尋的結果,如果沒有給完整的網址,請在站內再搜尋一次!

2019-08-02

在Anaconda3環境下安裝eric6 (The Eric Python IDE, v19.7),spyder也可以繼續正常使用

安裝Eric6 v19.7 前的環境:
  • Anaconda3 -2019.07 ( https://www.anaconda.com/distribution/#windows )
  • 已在Anaconda3環境下使用的Applications:Spyder(v3.3.6),  Jupyter Notebook(v6.0.0), Visual Studio Code(v1.36.1)。已安裝QtPy模組(v1.8.0)(QtPy provides support for PyQt5, PyQt4, PySide2 and PySide using the Qt5 layout (where the QtGui module has been split into QtGui and QtWidgets). https://pypi.org/project/QtPy/ )
  • Thonny (v3.1.2)。已安裝 pyqt5-tools模組(這個模組對pyqt5的版本需求是5.11.3)
在Anaconda3環境下安裝Eric6會失敗,主要是pyqt5已安裝版本,在有需求的Applications間的差異問題,修正pyqt5的安裝版本,即可順利安裝eric6。( https://eric-ide.python-projects.org/eric-download.html )

安裝過程,說明如下:
  1. 就按照Eric6網站上的安裝說明,取得最新版本
    https://sourceforge.net/projects/eric-ide/files/eric6/stable/19.07/eric6-19.7.zip/download 
  2. 將zip解壓縮至:Anaconda3安裝路徑下的以下位置:
    C:\ProgramData\Anaconda3\Lib\site-packages
  3. 以系統管理員身分,開啟Anaconda Prompt,切換至eric6解壓縮後的目錄下
    C:\ProgramData\Anaconda3\Lib\site-packages\eric6-19.7
  4. 安裝 eric6
    (base) C:\ProgramData\Anaconda3\Lib\site-packages\eric6-19.7>python install.py install
    Checking dependencies
    Python Version: 3.7.3
    Found PyQt5
    Found pyuic5
    QScintilla could not be detected.
    Error: cannot import name 'Qsci' from 'PyQt5' (C:\ProgramData\Anaconda3\lib\site-packages\PyQt5\__init__.py)

    Shall 'QScintilla' be installed using pip? (Y/n) Y
    Collecting QScintilla
      Downloading https://files.pythonhosted.org/packages/52/1a/ce7875f433fd0aa1d3774609586f77d78ff0524790942cca95e1d13a7ac7/QScintilla-2.11.2-5.12.4-cp35.cp36.cp37.cp38-none-win_amd64.whl (2.0MB)
    ...
    Collecting PyQt5>=5.10.1 (from QScintilla)
      Downloading https://files.pythonhosted.org/packages/3b/d3/76670a331935f58f9a2ebd53c6e9b670bbf15c458fa6993500af5d323160/PyQt5-5.13.0-5.13.0-cp35.cp36.cp37.cp38-none-win_amd64.whl (49.7MB)
    ...
    Collecting PyQt5_sip<13,>=4.19.14 (from PyQt5>=5.10.1->QScintilla)
      Downloading https://files.pythonhosted.org/packages/cf/c8/1e9eda4ba09a84fc528d4c87001de2d7a8cbbe04c2a834af3eb81a0ecd88/PyQt5_sip-4.19.18-cp37-none-win_amd64.whl (51kB)
    ...
    ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
    ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.13.0 which is incompatible.

    Installing collected packages: PyQt5-sip, PyQt5, QScintilla

    ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 存取被拒。: 'C:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\QtCore.pyd'
    Consider using the `--user` option or check the permissions.


    Sorry, please install QScintilla2 and
    its PyQt5/PyQt4 wrapper.
    Error: QScintilla could not be installed.

    Press enter to continue...
  5. eric6安裝發生錯誤的原因:
    安裝eric6需要安裝QScintilla,需要PyQt5 5.10.1 以上的版本,系統自動收集安裝了 pyqt5 5.13.0的版本。
    但已安裝的spyder 3.3.6 限制 pyqt5 必須是 v5.13以下 (<5.13)
  6. 重新安裝pyqt5-tools,並指定安裝版本為 5.11.3
    (base) C:\ProgramData\Anaconda3>pip install pyqt5==5.11.3
    Collecting pyqt5==5.11.3
      Downloading https://files.pythonhosted.org/packages/a7/2d/d2c989006c86ae98ed230c28c3e0dd7fa0374e723afc107d12268159ceb7/PyQt5-5.11.3-5.11.2-cp35.cp36.cp37.cp38-none-win_amd64.whl (93.4MB)
    ...
    ERROR: spyder 3.3.6 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
    Installing collected packages: pyqt5
    Successfully installed pyqt5-5.11.3
  7. 安裝pyqt5-tools
    (base) C:\ProgramData\Anaconda3>pip install pyqt5-tools
    Collecting pyqt5-tools
      Downloading https://files.pythonhosted.org/packages/6a/35/98279ba706e9c3731f0f53813e9a8152ed662f2230e8af18a20d490167be/pyqt5_tools-5.11.3.1.4-cp37-none-win_amd64.whl (59.4MB)
    ...
    Requirement already satisfied: pyqt5==5.11.3 in c:\programdata\anaconda3\lib\site-packages (from pyqt5-tools) (5.11.3)
    Requirement already satisfied: click in c:\programdata\anaconda3\lib\site-packages (from pyqt5-tools) (7.0)
    Collecting python-dotenv (from pyqt5-tools)
      Downloading https://files.pythonhosted.org/packages/57/c8/5b14d5cffe7bb06bedf9d66c4562bf90330d3d35e7f0266928c370d9dd6d/python_dotenv-0.10.3-py2.py3-none-any.whl
    Requirement already satisfied: PyQt5_sip<4.20,>=4.19.11 in c:\programdata\anaconda3\lib\site-packages (from pyqt5==5.11.3->pyqt5-tools) (4.19.18)
    Installing collected packages: python-dotenv, pyqt5-tools
    Successfully installed pyqt5-tools-5.11.3.1.4 python-dotenv-0.10.3

  8. 安裝 eric6
    (base) C:\ProgramData\Anaconda3\Lib\site-packages\eric6-19.7>python install.py install
    Checking dependencies
    Python Version: 3.7.3
    Found PyQt5
    Found pyuic5
    QScintilla could not be detected.
    Error: cannot import name 'Qsci' from 'PyQt5' (C:\ProgramData\Anaconda3\lib\site-packages\PyQt5\__init__.py)

    Shall 'QScintilla' be installed using pip? (Y/n) Y
    Collecting QScintilla
      Using cached https://files.pythonhosted.org/packages/52/1a/ce7875f433fd0aa1d3774609586f77d78ff0524790942cca95e1d13a7ac7/QScintilla-2.11.2-5.12.4-cp35.cp36.cp37.cp38-none-win_amd64.whl
    Requirement already satisfied: PyQt5>=5.10.1 in c:\programdata\anaconda3\lib\site-packages (from QScintilla) (5.11.3)
    Requirement already satisfied: PyQt5_sip<4.20,>=4.19.11 in c:\programdata\anaconda3\lib\site-packages (from PyQt5>=5.10.1->QScintilla) (4.19.18)
    Installing collected packages: QScintilla
    Successfully installed QScintilla-2.11.2
    Found QScintilla2
    Found QtGui
    Found QtNetwork
    Found QtPrintSupport
    Found QtSql
    Found QtSvg
    Found QtWidgets
    Found QtWebEngineWidgets
    Qt Version: 5.11.2
    sip Version: 4.19.18
    PyQt Version: 5.11.3
    QScintilla Version: 2.11.2
    All dependencies ok.
    Cleaning up old installation ...
    Creating configuration file ...
    Compiling user interface files ...
    Compiling source files ...
    Installing eric6 ...
    Installing Python API files to 'C:/ProgramData/Anaconda3/lib/site-packages/PyQt5/Qt\qsci\api\python'.
    Installing Ruby API files to 'C:/ProgramData/Anaconda3/lib/site-packages/PyQt5/Qt\qsci\api\ruby'.
    Installing QSS API files to 'C:/ProgramData/Anaconda3/lib/site-packages/PyQt5/Qt\qsci\api\qss'.
    Installation complete.
    Press enter to continue...
  9. 安裝 eric6 成功
    • 確認可以啟動 spyder
    • 確認可以啟動designer.exe
    • 確認可以啟動 eric6

1 則留言:

  1. 感謝您寫出解決的方法,讓我節省許多摸索的時間!

    回覆刪除