cmd pip install to path code example
Example 1: add pip to path
import os
import sys
pipPath = f'{os.path.dirname(sys.executable)}\\Scripts'
os.system(f'setx PATH "%PATH%;{pipPath}"')
Example 2: pip path windows 10
C:\Users\[User Name]\AppData\Local\Programs\Python\Python39\