Skip to content

Commit 8382bc4

Browse files
committed
reload site packages after installing pip
1 parent a605d2d commit 8382bc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Content/Scripts/upystartup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import os
66
from os import listdir
77
from os import path as ospath
8+
import imp
9+
import site
810

911
from upypip import pip
1012

@@ -60,7 +62,7 @@ def checkPipDirectory():
6062

6163
else:
6264
#site path doesn't even exist
63-
print("Lib/site-packages misssing, re-installing pip.")
65+
print("Lib/site-packages missing, re-installing pip.")
6466

6567
#install pip
6668
print(cmd.PythonHomePath() + '/get-pip.py')
@@ -74,6 +76,9 @@ def checkPipDirectory():
7476
configFile.write(json.dumps(configs))
7577
configFile.truncate()
7678

79+
#reload site
80+
imp.reload(site)
81+
7782
#done
7883
print('upystartup::updated pip.exe location in <' + configPath + '>')
7984

0 commit comments

Comments
 (0)