Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variable PYTHONUSERBASE is not set during customized Python Installation #83303

Open
sarmar11 mannequin opened this issue Dec 23, 2019 · 1 comment
Open
Labels
3.7 (EOL) end of life OS-windows type-security A security issue

Comments

@sarmar11
Copy link
Mannequin

sarmar11 mannequin commented Dec 23, 2019

BPO 39122
Nosy @pfmoore, @tjguk, @zware, @zooba, @sarmar11

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-12-23.11:10:22.310>
labels = ['type-security', '3.7', 'OS-windows']
title = 'Environment variable PYTHONUSERBASE is not set during customized Python Installation'
updated_at = <Date 2019-12-23.11:10:22.310>
user = 'https://github.com/sarmar11'

bugs.python.org fields:

activity = <Date 2019-12-23.11:10:22.310>
actor = 'sarmar11'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Windows']
creation = <Date 2019-12-23.11:10:22.310>
creator = 'sarmar11'
dependencies = []
files = []
hgrepos = []
issue_num = 39122
keywords = []
message_count = 1.0
messages = ['358808']
nosy_count = 5.0
nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'sarmar11']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'security'
url = 'https://bugs.python.org/issue39122'
versions = ['Python 3.7']

@sarmar11
Copy link
Mannequin Author

sarmar11 mannequin commented Dec 23, 2019

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.

@sarmar11 sarmar11 mannequin added 3.7 (EOL) end of life OS-windows type-security A security issue labels Dec 23, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life OS-windows type-security A security issue
Projects
None yet
Development

No branches or pull requests

0 participants