Install Anaconda3

1, the download version is Anaconda3-2020.11 – Windows – x86_64. Exe mirrors.tuna.tsinghua.edu.cn/anaconda/ar… It is selected by default. The installation path cannot contain Spaces, for example, D:\ProgramData\Anaconda3

After installing the desktop – Start menu, you can see:

Environments A search for the python keyword in the Environments submenu shows that Python is 3.8.5 and installed automatically.

2. Create a virtual environment

Open Anaconda Prompt in the Start menu

Check the existing environment. Only one Base environment exists in the newly installed Anaconda3

Conda info -e or conda env list

Create an environment

Conda create -n firecat python=3.8.5

Activate the newly installed environment

conda activate firecat

Deactivate and return to the default Base environment

conda deactivate

Delete an existing environment

conda remove –name firecat –all

Note: after creating your environment firecat, the folder D: ProgramData\Anaconda3\envs\firecat will be generated

3. Change the PIP installation path

The terminal command to view the default installation path is python -m site USER_SITE: ‘C:\\Users\\firecat\\AppData\\Roaming\\Python\\Python38\\site-packages’ (exists) USER_BASE: ‘C:\\Users\\firecat\\AppData\\Roaming\\Python’ (exists)

D: \ ProgramData \ Anaconda3 \ Lib \ site. Py, line 87

# Enable per user site-packages directory
# set it to False to disable the feature or True to force the feature
ENABLE_USER_SITE = None

# for distutils.commands.install
# These values are initialized by the getuserbase() and getusersitepackages()
# functions, through the main() function when Python starts.
USER_SITE = None
USER_BASE = None
Copy the code

Modify to custom,

# Enable per user site-packages directory
# set it to False to disable the feature or True to force the feature
ENABLE_USER_SITE = True

# for distutils.commands.install
# These values are initialized by the getuserbase() and getusersitepackages()
# functions, through the main() function when Python starts.
USER_SITE = "D:\\ProgramData\\Anaconda3\\envs\\firecat\\Lib\\site-packages"
USER_BASE = "D:\\ProgramData\\Anaconda3\\envs\\firecat\\Scripts"
Copy the code

 

Install PyQt5

1. Method 1: Install PyQtfrom the default installation source. 5 Open Anaconda Prompt from the Start menu

Activate your environment

conda activate firecat

To view

pip list

conda list

Install PIP install pyQt5 –user PIP install pyQt5-tools –user PIP install pyQt5-stubs –user PIP install PyQtChart –user pip install pyqtwebengine –user pip install qscintilla –user

uninstall

pip uninstall pyqt5 -y

pip uninstall pyqt5-tools -y

pip uninstall PyQt5-stubs -y

pip uninstall qscintilla -y

pip uninstall pyqtwebengine -y

pip uninstall PyQtChart -y

pip uninstall PyQt5-sip -y

Step out of your environment

conda deactivate

Method 2, PIP switch source install PyQt

Open the start menu 】 the Anaconda Prompt PIP install -i pypi.tuna.tsinghua.edu.cn/simple pyqt5 – user PIP install – I https://pypi.tuna.tsinghua.edu.cn/simple pyqt5-tools –user pip install -i pypi.tuna.tsinghua.edu.cn/simple qscintilla –user

Or directly global more mirror source:

On Windows, create a PIP directory directly in the user directory as follows: C: \ Users \ firecat \ PIP, new file PIP. Ini, the following index – url = pypi.tuna.tsinghua.edu.cn/simple [global]

 

Install PyCharm

Requires the user to go to website www.jetbrains.com/pycharm/ download the installation package, manual installation. After installation, please set:

1. Simplified Chinese language package

 

2. Configure the Python environment

 

3. Configure PyQt5 external tools

QtDesigner has two configuration methods, QtDesigner D: ProgramData Anaconda3 envs firecat Lib site-packages PyQt5_tools Qt bin designer.exe $FileName$ $FileDir$ QtDesigner D:\ProgramData\Anaconda3\envs\firecat\Scripts\Python38\Scripts\pyqt5designer.exe $FileDir$ PyUIC can be configured in either of two ways. Uic is responsible for converting QT UI files into PY files. PyUIC D:\ProgramData\Anaconda3\python.exe -m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$_ui.py $FileDir$ PyUIC D:\ProgramData\Anaconda3\envs\firecat\Scripts\Python38\Scripts\pyrcc5.exe $FileName$ -o $FileNameWithoutExtension$_ui.py $FileDir$PyRCC RCC is responsible for converting QT QRC files into PY files. PyRCC D:\ProgramData\Anaconda3\envs\firecat\Scripts\Python38\Scripts\pyrcc5.exe $FileName$ -o $FileNameWithoutExtension$_qrc.py $FileDir$Copy the code

 

4. Problem solving

Double-click D:\ProgramData\Anaconda3\envs\firecat\Lib\site-packages\ pyQt5_tools \Qt\bin\designer. Popup error:

Solutions:

Copy the folder D: ProgramData Anaconda3 envs firecat Lib site-packages pyQt5_tools Qt plugins

D: ProgramData\Anaconda3\envs\firecat\Lib\site-packages\ pyQt5_tools \Qt\bin

 

Install Eric(not recommended, much less powerful than PyCharm)

Sourceforge.net/projects/er… Download and unzip eric6-20.7.zip and copy to D:\ProgramData\Anaconda3\Lib\site-packages\eric6-20.7

Open the Anaconda Prompt CD /d d :\ProgramData\Anaconda3\Lib\site-packages\eric6-20.7\ python install.py install –user

Then the folder D: ProgramData Anaconda3 Lib site-packages eric6 is generated and the executable program is D: ProgramData Anaconda3 Scripts eric6.cmd

To install the Autocomplete Jedi plug-in, download:

Eric-ide.python-projects.org/plugins6/st…

Then unzip to the path:

D:\ProgramData\Anaconda3\Lib\site-packages\eric6\Plugins

 

Installation of drawing calculation Software “MSN Three Musketeers”

Open Anaconda Prompt in the Start menu

To activate the user

conda activate firecat

Pypi.org/project/pip…

pip install matplotlib –user

pip install scipy –user

pip install numpy –user

pip install Pillow –user

pip install configobj –user

 

Install veusz

Veusz is a Python library for plotting various scientific diagrams, which can be exported as Postscript and PDF documents. Contains an easy-to-use graphical interface, as well as some command-line interfaces for direct invocation in Python programs.

github.com/veusz/veusz

Pypi.org/project/veu…

 

Install other software and use the offline package method

www.lfd.uci.edu/~gohlke/pyt…

www.lfd.uci.edu/~gohlke/pyt…

www.lfd.uci.edu/~gohlke/pyt…

You can download all the required wheels files into a folder (e.g D:\my_folder) and install them from Command Prompt like this: cd /d D:\my_folder and for each wheel file (*.whl) run: D: my_folder > PIP install --upgrade package_from_requirements. WHL (base) C:\Users\firecat>conda activate firecat (firecat) C:\Users\firecat>pip install Rtree-0.9.4-cp38-cp38-win_amd64. WHL (firecat) C:\Users\firecat> PIP install gdal-3.1.2 -cp38-cp38-win_amd64. WHL (firecat) C:\Users\firecat> PIP install opencv_python-4.4.0-cp38-cp38-win_amd64. WHL The Python native version matches the version of the downloaded installation package. *. WHL is not a supported wheel on this platformCopy the code

 

PyQt5 test source code

# This is a sample Python script. # Press Shift+F10 to execute or replace it with your code. Click Shift to search everywhere for classes, files, tool Windows, actions, and Settings. Import sys from PyQt5 import QtWidgets def print_HI (name): # Use a breakpoint in the line below to debug the script. Print (f'Hi, {name}') Press the green button in the spacing to run the script. if __name__ == '__main__': print_hi('PyCharm') app = QtWidgets.QApplication(sys.argv) widget = QtWidgets.QWidget() widget.resize(100, 100) widget. The show () sys. Exit (app. The exec ()) # visit https://www.jetbrains.com/help/pycharm/ for help PyCharmCopy the code

 

 

reference

Blog.csdn.net/kou_ching/a…

www.anaconda.com/

anaconda.org/

www.riverbankcomputing.com/