# Help while installing upgraded version of python

**URL:** <https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [October 7, 2020, 1:17pm UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495 "2020-10-07T13:17:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 7, 2020, 1:17pm UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/1 "2020-10-07T13:17:31Z")

</div>

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

 ![image](https://global.discourse-cdn.com/freecodecamp/original/3X/b/0/b01384d652d09511c346f3674311e3077a5afa06.png)  
It would be good if someone guide me through whole procedure of shifting to another python version..

---

<div class="post-metadata">

**Author:** ![gururajankappa](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gururajankappa/32/227426_2.png) [@gururajankappa](https://forum.freecodecamp.org/u/gururajankappa)\
**Post date:** [October 7, 2020, 4:48pm UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/2 "2020-10-07T16:48:41Z")

</div>

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 😀

---

<div class="post-metadata">

**Author:** ![jdelarubia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jdelarubia/32/174787_2.png) [@jdelarubia](https://forum.freecodecamp.org/u/jdelarubia)\
**Post date:** [October 7, 2020, 9:11pm UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/3 "2020-10-07T21:11:26Z")

</div>

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](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,

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 8, 2020, 6:05am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/4 "2020-10-08T06:05:03Z")

</div>

> [@gururajankappa](#):
>
> Then upgrade via the cmd line

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

> [@jdelarubia](#):
>
> reinstall their dependencies too

do you mean `external packages`, right?

---

<div class="post-metadata">

**Author:** ![jdelarubia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jdelarubia/32/174787_2.png) [@jdelarubia](https://forum.freecodecamp.org/u/jdelarubia)\
**Post date:** [October 8, 2020, 7:03am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/5 "2020-10-08T07:03:36Z")

</div>

> [@mukeshgurpude](#):
>
> 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](http://python.org). On a Mac, you can do this via `homebrew`. Maybe this is the way @gururajankappa refers to.

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 8, 2020, 7:38am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/6 "2020-10-08T07:38:09Z")

</div>

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

 ![image](https://global.discourse-cdn.com/freecodecamp/original/3X/3/4/34bfe32f5cef9ceb95663ab870e1243fabecc585.png)

---

<div class="post-metadata">

**Author:** ![jdelarubia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jdelarubia/32/174787_2.png) [@jdelarubia](https://forum.freecodecamp.org/u/jdelarubia)\
**Post date:** [October 8, 2020, 8:14am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/7 "2020-10-08T08:14:02Z")

</div>

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](https://global.discourse-cdn.com/freecodecamp/original/3X/1/2/121851e22c5f42389198a62076fb40e22c331172.png)

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

 ![screenshot.7](https://global.discourse-cdn.com/freecodecamp/original/3X/2/1/2164e575d036ec84e7b0929fd1d815ea526af6c1.png)  
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)

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 8, 2020, 9:01am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/8 "2020-10-08T09:01:25Z")

</div>

> [@jdelarubia](#):
>
> python 3.9 and numpy

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

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 8, 2020, 9:59am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/9 "2020-10-08T09:59:46Z")

</div>

![image](https://global.discourse-cdn.com/freecodecamp/original/3X/5/0/50310a034985ac2246b3d6e26f32c9aa94d6d852.png)

> [@jdelarubia](#):
>
> You may want to wait until `numpy` release an update)

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

---

<div class="post-metadata">

**Author:** ![jdelarubia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jdelarubia/32/174787_2.png) [@jdelarubia](https://forum.freecodecamp.org/u/jdelarubia)\
**Post date:** [October 8, 2020, 10:08am UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/10 "2020-10-08T10:08:45Z")

</div>

You can “watch” their [Github](https://github.com/numpy/numpy). 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.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:29pm UTC](https://forum.freecodecamp.org/t/help-while-installing-upgraded-version-of-python/424495/11 "2021-06-01T18:29:17Z")

</div>


