Uninstall and Re-install Python - Windows 10 issues

boB Stepp robertvstepp at gmail.com
Wed Jun 23 14:44:40 EDT 2021


Disclaimer:  I am no Python or programming expert!  However, I
recently installed Python 3.9.5 on my Windows 10 laptop, so I may be
able to help with some things.

On Wed, Jun 23, 2021 at 11:29 AM Suretha Weweje <surethaweweje at gmail.com> wrote:
>
> After I uninstalled Python 3.7and Python 3.9 and installed Python 3.9.5 and
> is displayed in Apps & features:
>
> Python 3.9.5 Python 3.9.5 (64-bit), size 101 MB, and
> Python Launcher, size 1.80 MB
>
> Upon checking the python version, I get the following error message:
> C:\>python --version
> Python was not found; run without arguments to install from the Microsoft
> Store, or disable this shortcut from Settings > Manage App Execution
> Aliases.

Unless you checked the checkbox to add Python to your path in the
installer then this is normal.  To check your version, instead type:

PS C:\Users\boB> py --version
Python 3.9.5

If you did not add Python 3.9.5 to your path you will need to use "py"
wherever you think you would use "python" to launch whatever, for
instance

py -m pip install ...

if you were going to install a package.  BTW, if you *want* to add
Python 3.9.5 to your path it is not very difficult to do so.  Search
online if you do not know how.

> In the Start Menu, Python 3.9 shortcut is present, and when I click on that
> it takes me to Python 3.9(64-bit) CMD.  Just to test, I add a print
> statement.
>
> Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print("This is Tuesday")
> This is Tuesday
> >>>
>
> Python 3.9.5 was installed in the C:\Python3.9.5 folder and it seems that
> not all the files were downloaded and for some reason, old files were added.
>
> On the Local Disk (C:) > Python3.9.5 and the folder created for the
> installation displays:
>
> Folders - DLLs, Doc, include, Lib, libs, Scripts, tcl, Tools
>
> The date on the above-mentioned folders is the same date as when Python
> 3.9.5 was installed (2021/06/21) however, the dates are displayed
> (2021/05/03) on the rest of the files as below:
>
> Text Document - LICENSE, NEWS,
> Application - python, pythonw
> Application extention - python3.dll, python39.dll, vcruntime140.dll,
> vcruntime140_1.dll
> The dates are different from the date of Python 3.9.5 installation

I believe these differing dates are normal as I show similar results.
For instance the individual files you mention all have the same date
of "5/3/2021 5:35 PM" on my laptop.  However, the folders all have a
date of "5/12/2021 7:25 (or 7:24)PM" with one exception, the "Scripts"
folder which has a date of "5/28/2021 9:52 PM".  This makes sense to
me.  The heading for this date/time column in the file explorer is
"Date modified".  Neither of us have "modified" the dll's for
instance.  The date of release of Python 3.9.5 was, in fact,
"5/3/2021", so that checks out.  OTOH, after installing Python 3.9.5 I
*later* installed (using pip) pytest and spacy.  The most recent of
these two installations reflects the "Scripts" folder's date modified
stamp.  If I go into the "Scripts" folder I do in fact see that pytest
was installed earlier and its date modified reflects that correct date
and time. As for the other folders I believe (Someone correct me if I
am mistaken.) that the folder dates normally reflect the installation
date by you as that is when those folders were created.  However, if
you open one of them and examine the contents you will see that the
individual files have the Python 3.9.5 release date since you have not
modified those files.

> I have no way of fully uninstalling the separate python installations and
> install a new python version.

As for your Python 3.7 installation still being around it all depends.
You will get different results when you originally installed Python
3.7.x if you (1) install for all users; (2) install with
administrative privileges; or (3) install just for the current user.
For instance I had Python 3.7.x installed prior to installing 3.9.5.
I uninstalled Python 3.7.x.  But it is still available!  If I run "py
-3.7 --version" I see it is still there.  If I look in my Windows
Start folder there is an entry for Python 3.7.  What gives?  In my
case my son also uses my laptop and *he* installed his own version of
Python 3.7.x as a *user*.  My uninstalling *my* installation of Python
3.7.x did not affect his installation.  And since my laptop account
has administrator privileges I can still see it in the Start Menu, but
*not* in the settings uninstall programs list.  Perhaps you are
experiencing something similar?

I don't fully understand how Windows implements user privileges and
the full details of what an administrator account can and cannot see.
Wiser heads than mine will have to chime in and explain as needed.

HTH!
boB Stepp


More information about the Python-list mailing list