Created
July 20, 2020 04:49
-
-
Save Ivoz/13bce40b7b9aeb6e72e8aa5ab52f93bc to your computer and use it in GitHub Desktop.
If you are able to run python code, use this to add python to your path on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from pathlib import Path | |
# Get the path to the Scripts directory | |
scripts_path = Path(sys.base_prefix) / "Tools" / "Scripts" | |
# Append it to python's import path so we can grab it | |
sys.path.append(str(scripts_path)) | |
# Import the main function from the win_add2path script | |
from win_add2path import main | |
# run the main function to add python to out path | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment