python -m site
sys.path = [
'C:\\Users\\li',
'C:\\Python39\\python39.zip',
'C:\\Python39\\DLLs',
'C:\\Python39\\lib',
'C:\\Python39',
'C:\\Python39\\lib\\site-packages',
]
USER_BASE: 'C:\\Users\\li\\AppData\\Roaming\\Python'
USER_SITE: 'C:\\Users\\li\\AppData\\Roaming\\Python\\Python39\\site-packages'
ENABLE_USER_SITE: True
Edit C:\Python39\Lib\site.py
USER_SITE = "E:\\Python39_base"
USER_BASE = "E:\\Python39_site"
python -m site
sys.path = [
'C:\\Users\\li',
'C:\\Python39\\python39.zip',
'C:\\Python39\\DLLs',
'C:\\Python39\\lib',
'C:\\Python39',
'E:\\Python39_base',
'C:\\Python39\\lib\\site-packages',
]
USER_BASE: 'E:\\Python39_site' (exists)
USER_SITE: 'E:\\Python39_base' (exists)
ENABLE_USER_SITE: True
将 E:\Python39_base\Library\bin 加到系统环境变量 PATH 中