Answers for "how to find pip path"

7

how to find where python is located

>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\Python25'
Posted by: Guest on May-28-2020
8

add pip to path

import os
import sys
pipPath = f'{os.path.dirname(sys.executable)}\Scripts'
os.system(f'setx PATH "%PATH%;{pipPath}"')
Posted by: Guest on June-26-2020

Browse Popular Code Answers by Language