Skip to content

Instantly share code, notes, and snippets.

@mark05e
Last active November 2, 2023 02:46
Show Gist options
  • Save mark05e/073ecff13313d06e996e80c8b4ed8c09 to your computer and use it in GitHub Desktop.
Save mark05e/073ecff13313d06e996e80c8b4ed8c09 to your computer and use it in GitHub Desktop.
for embeddable python files, place this inside python root directory and call from your scripts
set scriptDir=%~dp0
set invokeDir=%CD%
cd /d %scriptDir%
set PY_EXE=%CD%
set PY_PIP=%CD%\Scripts
set PY_LIB=%CD%\Lib;%CD%\Lib\site-packages
set PATH=%PY_EXE%;%PY_PIP%;%PY_LIB%;%PATH%
cd /d %invokeDir%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment