Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading python on Windows 10’s Bash Shell

I was trying to update python3 in the Linux Bash Shell for Windows 10.

Here is what I tried:

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

But I got the following error:

Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Errors were encountered while processing:
 ghc
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried searching if it will override my python 3.4 and make it inaccessible as in delete it and install 3.6, but found no results.

Is there a safe way to upgrade python3 here

[EDIT]

After upgrading the shell to 16.04 using do-release-upgrade, the error goes away. Update can be done following this link.

like image 738
Ganesh Kathiresan Avatar asked Feb 24 '17 10:02

Ganesh Kathiresan


People also ask

How do I update an existing version of Python?

Updating to a new Python version is easy on a computer running Windows. All you have to do is visit the Python downloads page and download the latest version. Clicking on the button will replace the existing version of Python with the new version. The older version will be removed from your computer.


1 Answers

First, I'd strongly encourage you to make sure you're running Windows 10 Fall Creators Update (or later).

Secondly, I'd recommend adding the apt upgrade step below:

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt upgrade
sudo apt install python3.6

The upgrade step ensures that all your installed packages are upgraded to their latest version, and can often fix "errors while processing" other packages' installation.

like image 199
Rich Turner Avatar answered Oct 17 '22 17:10

Rich Turner