Install the module library (pip) in UE4.25.4's python
1. Add environment environment variables
Edit the account environment variable and add the python directory in UE4 to the Path environment variable. (must be Path)
Note:
If the computer itself is equipped with python, and it is a different version from UE4's python, you can first delete (copy) the environment variable of the computer's own python, or rename the python.exe in the root directory of the computer's own python It is python3.exe, so that when using python in cmd, it will not use the python of the computer itself
For example, the python directory of my UE4.25.4 is:
D:\Epic Games\UE_4.25\Engine\Binaries\ThirdParty\Python\Win64;D:\Epic Games\UE_4.25\Engine\Binaries\ThirdParty\Python\Win64\Scripts;
Note that there are two paths here, one is the python directory path, and the other is the scripts path under the python directory, both are required, and each path needs to be used; the semicolon ends
2. Check the python version that comes with UE4
1. Open cmd and enter python
It is checked here that the python version is 2.7.14, and UE4.25.4 is this version.
2.vscode check python version
Press ctrl+shitf+p, select the interpreter, add the path of UE4python, and you can also check the version of python, which is consistent with the version output by cmd.
3. cmd checks the pip of python
UE4's python comes with pip, and the pip directory is:
Open cdm, enter the command, you can also check out pip
python -m ensurepip
You can upgrade pip, command
python -m pip install --upgrade pip
Fourth, use pip to install the module library in cmd
For example, install cython
python -m pip install cython
Friendly reminder: If it is not necessary, do not install too many module libraries for the python that comes with UE4.