To use external Python packages within PythonScript you have to install the packages into the virtual environment created by the extension.
- Clone the full project from Gitlab HERE
- Install the PythonScript library into the Godot project via the AssetLib tab. Godot 3.5 ONLY
- Go into the
addons
folder within your Godot project and then into theaddons/pythonscript
folder - Go to the folder for your system e.g
windows-64
- Install pip by running the command
./python.exe -m ensurepip
- Install libraries used by the image classifier with this command
./python.exe -m pillow numpy pandas
- Install Pytorch.
./python.exe -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
After these steps you should be ready to demo this project or have a working framework for Machine Learning within Godot 3.5.