Confused with installing per-user in Windows

ddbug pavel.aronsky at gmail.com
Sun Nov 6 20:11:45 EST 2016


Dear experts,

I need to install some scripts for current user (to skip sudo, UAC popups and whatever).

So I make a sdist and use python -m pip install --user ....

This should work for either Python 2 or 3.

On Linux, pip installs the scripts into ~/.local/bin ; users are instructed to add this to their PATH if they have not done so already.

In Windows, the user-local directory for scripts is %APPDATA%\Python\Scripts. It is not in PATH by default and finding it is hard (because Microsoft made it hidden in their infinite wisdom).

But more to this, either Python (2.7 or 3.5) will NOT look there by default. When user types "python myscript.py" or "py myscript.py" he is baffled by "not found".

Now, the question: 

1. would it be good if python interpreter could JUST find user-local scripts - by default or by some easy configuration option?

2. If not, would it be good to put this smartness into the PY.EXE launcher, make this behavior default or by a simple command line option?

So that user can be instructed to type "py myscript [.py]"  and it will JUST work, if the script is on existing PATH or in the per-user directory?


I know about bdist_wininst and Windows specific install options, but prefer single sdist installer whenever possible.

Thanks for reading.

--d



More information about the Python-list mailing list