I’m creating an installer for one of my projects, that download the binaries of the project (in a ZIP file) and then unzip it into a directory in the programs folder of the OS, and I want to add this directory to the PATH
.
I tried this:
import os
os.environ['PATH'] += os.pathsep + install_dir # `install_dir` is the installation directory
But it’s not permanent and don’t stay at the end of the script.
Thanks for any answer.