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

顯示具有 Anaconda Navigator 標籤的文章。 顯示所有文章
顯示具有 Anaconda Navigator 標籤的文章。 顯示所有文章

2019-08-17

讓在Anaconda Navigator環境下安裝執行的Visual Studio Code增加PYQT Integration的擴充功能

  1. 在Visual Studio Code安裝PYQT Integration的擴充功能
  2. 安裝PYQT Integration擴充功能後,將會增加下列功能,或更多,例如:
    從VS code直接開啟 designer.exe 新增 ui form,在VS Code下預覽 ui form ...

    PYQT: New FormOpen designer
    PYQT: Edit In DesignerOpen designer with current ui form
    PYQT: PreviewPreview current ui form
    PYQT: Compile FormCompile ui form to path defined in "pyqt-integration.pyuic.compile.filepath"
    PYQT: Compile ResourceCompile qrc file to path defined in "pyqt-integration.pyrcc.compile.filepath"
    PYQT: Generate Translation File (.ts)Compile UI file (.py) to translation file with path defined in "pyqt-integration.pylupdate.compile.filepath"
    Compile .pro file
    PYQT: Open With Qt LinguistOpen with Qt Linguist for translation file (.ts)
  3. 如果從 VS Code,無法正常啟動 designer.exe 或 pyuic5 ...,可以透過擴充延伸模組設定,指定正確的路徑、檔名 ...
  4. 以Qtdesigner這個設定項目為例,designer.exe,通常都是放在,Anaconda3安裝目錄的\Lib\site-packages\pyqt5_tools\路徑下。
  5. 設定項目的參考資料:
    pyqt-integration.qtdesigner.pathPath of executable file of qt designer, the extension will ask you to set at the first time it runs, e.g. c:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\site-packages\\pyqt5-tools\\designer.exe
    pyqt-integration.pyuic.cmd"pyuic" command, default "pyuic5"
    pyqt-integration.pyuic.compile.filepathCompile file path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\UI\\Ui_${ui_name}.py
    pyqt-integration.pyuic.compile.addOptionsAdditional options for pyuic compiling, it can be a combination of '-x', '-d', '-i', etc.
    pyqt-integration.pyrcc.cmd"pyrcc" command, default "pyrcc5"
    pyqt-integration.pyrcc.compile.filepathCompile file path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\QRC\\${qrc_name}_rc.py
    pyqt-integration.pyrcc.compile.addOptionsAdditional options for pyrcc compiling, it can be a combination of '-root', '-threshold', '-compress', '-no-compress', etc.
    pyqt-integration.pylupdate.cmd"pylupdate" command, default "pylupdate5"
    pyqt-integration.pylupdate.compile.filepathOnly works when compiling an UI file (.py), Stores the target '.ts' file's path, relative path as default, switch to absolute path by involving ${workspace}, e.g. ${workspace}\\TS\\${ts_name}.ts
    pyqt-integration.pylupdate.compile.addOptionsAdditional options for pylupdate, it can be a combination of '-verbose', '-noobsolete', '-tr-function', '-translate-function', etc.
    pyqt-integration.linguist.cmd"linguist" command, default "linguist"

讓在Anaconda Navigator環境下安裝的 Visual Studio Code (VS code),以繁體中文的介面顯示

安裝Visual Studio Code (VS Code) 繁體中文語言包(Chinese (Traditional) Language Pack for Visual Studio Code)的步驟:
  1. 點擊「Extensions」→在Extensions marketplace的搜尋方塊內輸入:chinese language pack,選取「Chinese (Traditional) Language Pack for Visual Studio Code」,可以查看VS Code 的中文(繁體)語言套件的說明擊使用方式。
  2. 點擊「Install」,安裝後會提示:重新開啟VS Code
  3. 重新啟動後,就會以繁體中文的語言界面顯示。如果沒有以中文顯示,可以參考以下的使用方式說明:
    安裝了之後,在 locale.json 裡面設定 "locale": "zh-tw" 即可載入中文(繁體)的語言套件。要修改locale.json,可以按下Ctrl+Shift+P來呼叫 命令選擇區,輸入 "config" 以從其他可用命令裡面篩選出 Configure Language 命令。

2019-07-31

使用Anaconda Navigator安裝 Python的開發工具VS code

讓Anaconda Navigator來協助開發環境(environment)、模組(package)的管理,是一件愉快的事!
之前已經使用過Jupyter Noteboks、Thonny、Spyder ...等,總有一些功能不能盡如人意,試試VS code,感覺令人滿意。
  • AutoCompletion (IntelliSense ) / 自動補全 / 自動完成  / 輸入提示 ...,例如:
    import sys
    from PyQt5 import QtWidgets
    oApp=QtWidgets.QApplication(sys.argv)
    oWidget=QtWidgets.QWidget()
    ##以上Jupyter Noteboks、Thonny、Spyder 都還可以順利使用 AutoCompletion
    oWidget.resize(300,100)
    ##上面這一行,輸入oWidget. 後,
    ##Jupyter Noteboks、Thonny、Spyder...
    ##通通無法帶出提示,知道有多少方法、屬性的選項,
    ##真的記不了那麼多啦...
    ##但是 VS code 可以辦到...
  • Code Folding / 程式碼折疊
    習慣了使用NotePad++的程式碼摺疊功能後,沒有這個功能可以用,會忽然手足無措,尤其是在面對Python用「縮排」的作法取代其他程式語言用 { } 來表示函式、控制敘述...的執行範圍,沒有明顯的 end of def / if / for/ while ... 的標示,程式的辨識很容易混淆,又開始懷念 notepad++ 了 ...
    Notepad++ 的 Code Folding / 程式碼折疊

    Notepad++ 的 Code Folding / 程式碼折疊
VS code滿足了當前我最需要的功能:AutoCompletion(IntelliSense)、Code Folding不用就太可惜了,用Anaconda Navigator安裝VS Code超簡單的 ...

  • Anaconda Navigator → Home,可以查看那些基於Anaconda的應用程式已經安裝?有哪些準備Ready的程式可以安裝?
  • 安裝完成後,「Install」鈕,變成「Launch」鈕,按下Launch就可以開始用了...

2019-07-23

Anaconda Python模組管理(Package) : 使用 Anaconda Navigator 更新、安裝模組

  1. 開啟Anaconda Navigator
  2. 選擇『Environment』
    點擊『』,先把環境選取的區塊收起來
    在Anaconda Package區塊中,
    模組Package選項:installed / Not installed / Updatable / Selected / All,選擇:All
    在package搜尋文字方塊中,輸入搜尋標的,例如:pyinstaller
  3. 『Apply』安裝