permission denied using python 3.8

Eryk Sun eryksun at gmail.com
Tue Nov 5 19:10:55 EST 2019


On 11/5/19, robin deatherage <about2mount at gmail.com> wrote:
>
> MS Windows uses a UAC User Control. So it is best to not add a package
> to an Admin user on Windows.

The OP would have to install Python in a location that that's
inaccessible to standard users and add this directory to the system
PATH. It's dysfunctional to add directories to the system PATH that do
not grant read and execute access to standard users, so that would be
a simple installation error. (Unlike Unix, Windows does not keep
searching PATH until it finds a file that it's allowed to execute. It
tries to execute the first match it finds, even if it's not permitted
to do so.) Also, this does not explain why the 3.7 installation works,
assuming the OP follows a similar installation procedure in that case.

For both 3.7 and 3.8, we need to know how Python is executed,
including the fully-qualified path of python.exe (e.g. from running
`where.exe python`). Also, from an administrator command prompt, we
need the discretionary access control list (DACL) of the Python
installation directory and executable (e.g. `icacls.exe "<install
path>"` and `icacls.exe "<install path>\python.exe"`). Also, from a
standard command prompt, we need the current user's list of groups
(e.g. `whoami.exe /groups /fo list`).

> Also there is no limit to how many different versions of Python you use on
> Windows---As long as you have a different UAC Control user logged in Windows
> for each one you add. I have 2.75, 3.5, 3.6, 3.7.0 and now 3.8 on my Windows
> now and all work fine. My user UAC logins may number five but that is is how
> it is suppose to be done anyways in Windows.

Each minor release of Python can be installed to the same user profile
and/or the system profile, and you can even install both the 32-bit
and 64-bit builds of a minor release. An installation can also be
updated in place to a newer micro release (e.g. 3.7.4 -> 3.7.5) since
minor releases guarantee ABI compatibility for extension modules.
There's no conflict with other installed releases as long as we use
the py.exe launcher to run a particular version (e.g. `py -3.7` and
`py -3.7-32`) and associate .py scripts with the launcher and use
shebangs (e.g. "#!python3.7" and "#!python3.7-32"). If you need
multiple micro releases (e.g. 3.7, 3.7.1, 3.7.2, ...), on the other
hand, it's probably for continuous-integration testing, for which you
can use the provided nuget packages instead of a standard
installation.


More information about the Python-list mailing list