Environment variable PYTHONUSERBASE is not set during customized Python Installation.
Python installer 3.7.6(x64) / Windows 10
Check 1: Customize the installation to install Python in C:\Python37 for all users.
Result: Access Denied using pip
Check 2: Check 1: Customize the installation to install Python in C:\Program Files\Python37 for all users (default).
Result: pip works, but error appears trying to install anything with pip. For example:
>>pip install virtualenv
WARNING: The script virtualenv.exe is intalled in 'C:\Users\XXX\AppData\Roaming\Python\Python37\Scripts' which is not on path
By default APPDATA matches with C:\Users\XXX\AppData\Roaming
and PYHTONUSERBASE is empty
-----------------------------------------------------------------
I've found the path constructor in \Python37\Lib\site.py (_getuserbase)
So I try the following steps:
- Create folder with full control in C:\ (C:\Python)
- Set environment variable PYTHONUSERBASE=C:\Python
- Install Python for all users in C:\Python\Python37
That works for me.
|