Help while installing upgraded version of python

This is not really related to the curriculum…
I’ve installed python3.9 yesterday on my windows 10…
Before installing I kept note of all the installed packages using pip freeze>req.txt.
Now after installing v3.9 I uninstalled python3.8.6 from control-panel>programs. it was all fine but I lost my installed packages.
So, today I was going to install all the packages with pip install -r req.txt but pip gave me error…
I fixed it by following folks on Stack Overflow, by deleting python38 directory…
But I’m unable to install them , I came across following error


It would be good if someone guide me through whole procedure of shifting to another python version…

Delete python
Download python from their website. One version old , just to show you the process
Then upgrade via the cmd line. Do not delete the previous version.
Upgrade pip as well
I asked u to install the previous version just to show u the process. U don’t need to do it. But u have to do it this time
Upgrade pip if there’s an update.

Next time u want to upgrade just

Run the command to upgrade python version.
If it prompts to update the pip version just do it.

Hope It helps :grinning:

Hi @mukeshgurpude,
It seems like it’s trying to use some cached version of your libraries. This issue is not new on Windows 10 [see this] (https://github.com/pypa/pip/issues/8272).
Since Python 3.9 is ery new, it may introduce conflicting behaviours or incompatibilities with some of the libraries you have installed in your system.
Before considering rolling back to a 3.8.x version, I would try to completely remove all trace of python by uninstalling from the Control Panel as you did, AND, physically deleting the folders; specially site-packages. This would permit you a clean install. the caveat is, if you have python programs you need for some other tasks, you will need to reinstall their dependencies too!
Cheers,

How to upgrade python itself from command line, I’m unable to found such command in windows… Please guide me…

do you mean external packages, right?

Yes, exactly, your apps’ dependencies.

About upgrading python from the command line, there is no way on Windows to my knowledge if you use the standard installable from python.org. On a Mac, you can do this via homebrew. Maybe this is the way @gururajankappa refers to.

Reinstalled python cleared python39 folder in appdata, but still same problem

Hi @mukeshgurpude,

I made the following 2 tests.
I first installed numpy on a virtual environment under python 3.8.5 and it worked.
screenshot.6

Then, I tried running the same configuration on a Docker container and it failed.


This is a Linux debian image, so Windows is not the problem. I think there is some incompatibility between python 3.9 and numpy.

Can you downgrade to a earlier version of python? (You may want to wait until numpy release an update)

Actually, not only numpy there are many packages not optimized for python3.9…
Now I understood the importance of virtual environments for each project.

1 Like

Is there a way to get notified about the package updates??

You can “watch” their Github. I can’t think of nothing better right now, sorry! But, this way, you’ll see on your Github “feed” when they release a new version.

1 Like