Python GUI development environment installation


    Basic environment

       Python3.x interpreter environment
        pip package management tool
        pipenv virtual environment management tool


    IDE
        PyCharm installation
    GUI development environment

  Global Installation

           PyQt5 mounted
                pip install PyQt5 -i https://pypi.douban.com/simple
            auxiliary tool mounted
                pip install PyQt5-tools -i https://pypi.douban.com/simple  

  Virtual Environment Installation

 

 

            Create a virtual environment (Python3.x version interpreter)
                cd project path
                pipenv --three
            modify mirroring
                Qinghua: HTTPS: //pypi.tuna.tsinghua.edu.cn/simple
                Pipfile
                    
            activation environment
                pipenv shell
            installation-party libraries
                pipenv install pyqt5
                pipenv install pyqt5-tools


        Online documentation
            http://pyqt.sourceforge.net/Docs/PyQt5/class_reference.html
        virtual environment installation
            to create a virtual environment (Python3.x version interpreter)
                cd project path
                pipenv --three
            modify mirroring
                Qinghua: https: // pypi. tuna.tsinghua.edu.cn/simple
                Pipfile
                    
            activation environment
                pipenv shell
            installation-party libraries
                pipenv install pyqt5
                pipenv install pyqt5-Tools
 

   Testing
        try to import package PyQt5, to see if there is a problem
        from PyQt5.Qt import *
 

D:\pyqt51>pipenv install
Creating a virtualenv for this project…
Pipfile: D:\pyqt51\Pipfile
Using e:\work\python64\python.exe (3.7.2) to create virtualenv…
[=   ] Creating virtual environment...Already using interpreter e:\work\python64\python.exe
Using base prefix 'e:\\work\\python64'
New python executable in C:\Users\wei\.virtualenvs\pyqt51-EL5sW8oD\Scripts\python.exe
Installing setuptools, pip, wheel...
done.

Successfully created virtual environment!
Virtualenv location: C:\Users\wei\.virtualenvs\pyqt51-EL5sW8oD
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (a65489)!
Installing dependencies from Pipfile.lock (a65489)…
  ================================ 0/0 - 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

D:\pyqt51> pipenv shell
Launching subshell in virtual environment…
Microsoft Windows [版本 10.0.18362.592]
(c) 2019 Microsoft Corporation。保留所有权利。

(pyqt51-EL5sW8oD) D:\pyqt51>exit

 

Published 100 original articles · won praise 18 · views 30000 +

Guess you like

Origin blog.csdn.net/sereasuesue/article/details/104264039