Anyway - what I want to do now is make one clean installation where I stick to one set of rules for everything. All packages installed to one single superdirectory (vs. getting scattered all over the system) and all PATH variables set accordingly to the most universal and complete configuration possible (I don't want to see any complaints from Python ever again in this regard).
This is contradictory. A single installation with a common set of rules, every possible installed package, comprehensive PATH etc. is inherently not "clean". The point of maintaining separate installations is so that one user's changes do not unexpectedly impact on the operation of another user's code. It is not possible to do this with a single installation. If you upgrade a library, for example, it affects every user who wrote code that uses that library, who must now check for incompatibilities.
Correct privileges for the Windows installer, e.g. the confusing "for all users (requires elevation)" and subsequent (second!) "Install for all users" options.
The first one means "Install the launcher for all users", which is why that checkbox is on the same line as "py launcher". (If you are not familiar with the Python launcher for Windows, please read the documentation.) it says "(requires elevation)" because the installer requires elevation in order to install this feature for all users. You do not need to do this if you have installed it from a previous version of Python.
and subsequent (second!) "Install for all users" options.
This is the option to install this version of Python for all users. The install directory changes according to the "for all users" setting, in the expected way.
Windows UAC may prevent access of Python and/or pip to C:\Program Files\ without proper exception handling (e.g. user prompt) in place
It will prevent write access without elevation, yes. This is by design, and it is why the option exists for per-user installations.
requires write access, because its purpose is to install libraries. I do not know whether it can request elevation from the command prompt; probably not. You can work around this by using the command in an elevated command window. With UAC enabled, you will not be able to install libraries into a Python for-all-users installation (i.e., in Program Files): it is the explicit purpose of UAC to prevent that sort of thing.pip
Python normally does not require write access to these directories. The standard library does not need write access once the library is installed. There might be a problem if you uncheck "Precompile standard libraries"; I have not tested this and have stopped using Windows. Third-party libraries normally will not require write access for their own installation directories, either. If you encounter a problem, consult the documentation for that library.
Usage of get-pip.py vs. some other methods to install pip, which also concerns the usage of python vs. python -m vs. pip install vs. pip install --user etc. in this context and subsequent installation of user packages.
etc. are deprecated. They are tools intended to account for the fact that Python didn't always come bundled with get-pip. It does now. pip works the same way regardless of whether it was bundled with Python or installed to an older Python version separately. There is not a clear question here; there are several specific things that need to be researched and understood about how to use pip.pip
Helpful and cautionary tale, be a good idea not to delete it I think... I'll assume it was the profanity that got it deleted so I've edited it out.
!!!! WARNING !!!!
If you're like me and you think ah shur I'll do an 'apt list --installed | grep -i python' and then 'apt purge -y' all that crap, well, maybe don't.
Now my entire system is doo-doo. It all seemed fine until I rebooted and now there is no network connection, netplan and a bunch of other stuff is just gone. No recovery possible.
Actually it looks like it was an 'apt autoremove' AFTER I'd done the above that actually removed netplan.
And all because I wanted to remove multiple python versions to get over those gosh darn import issues and messin' around with pip and pip3 and pip3432432 and what gosh flippin' version of python is tied to what oody doody version of pip...
UPDATE - This video helped me recover me files https://youtu.be/tGIPeWkPkMc
I'd highly recommend using virtualenv, and never modifying the system python, except to install pip and virtualenv if necessary.
As was alluded to above, many OSes count on having a working python2 in order to function.
So...
[UPDATE: this worked in 2017, and may not work well in later years!]
apt-get remove python3
apt-get install python3
pip3 install virtualenv
virtualenv -p python3 venv
. venv/bin/activate
# now you are in a nice python3 world, completely isolated from system python
# remember to say . venv/bin/python every time you do anything
# or you can even add it to your .bashrc
You need not have to remove . It will just make the matters worse.
Instead, remove python3 and install it again following the command below.pip
sudo apt remove python3-pip
sudo python3.8 -m easy_install pip
is implicitly equivalent to two subcommands:python setup.py install
build, which puts the files to install into the build directory, andinstall, which copies files from the build/lib directory into the installation directory.It appears that the first step is only performed when necessary, i.e. when you run without first removing the python setup.py install directory, you are installing stale modules from the previous build.build
To have changes take effect immediately while developing, you should run , which creates a link in the installation directory back to the source code.python setup.py develop