Mattpats
Mattpats

Reputation: 534

How do I upgrade to Python 3.8 with Anaconda?

I recently installed Python 3.8 onto my computer. I now have Python 3.7 and 3.8. I would like to delete 3.7 but I don't want to mess anything up.

When I type 'python --version' in the Anaconda Prompt,

Python 3.7.9

I fear that if I uninstall 3.7, all the libraries in Anaconda will not work. How do I uninstall 3.7 and make sure that Anaconda "links up" with 3.8?

UPDATE: I've since figured this out... I originally tried to install with 'conda update python' ... this does not achieve the update. I then downloaded 3.8 from Python's website. This seemed to mess up things. I then uninstalled all of Anaconda and then reinstalled it. By re-installing, Python 3.8 was installed and is working. For future updates, I am still not sure what the best way to update from 3.x to 3.y is as suggestions on other message boards did not seem to work.

Upvotes: 2

Views: 5782

Answers (2)

user2566834
user2566834

Reputation: 57

Thank you for sharing this. I literally just spent a day trying to update python version using conda but it goes into a seemingly endless loop of resolving conflicts. I also tried to install 3.8 directly but that did not work. The solution really was to just download and install the latest version of Anaconda.

Upvotes: 1

dtlam26
dtlam26

Reputation: 1600

I try to give you a comprehensive solution If you want to update without removing you just need to switch the python3 to python3.8. The way install python3.8 will be executed through ppa. Then you can switch between version of python

sudo rm /usr/bin/python3 
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1

Choose python3 link with python3.8, then pip3 will point to python3.8

But if you remove python 3.7, you need to self configure pip again to have it point to an exact python version by

wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py  #which has been linked to 3.8

However, this processed is simple for virtual environment, you just need to config your own package of python by yourself choosing. You can install any environment by creating a new environment. Your python3.7 will be a base environment,

Upvotes: 1

Related Questions