Python update in win-bash

I tried to upgrade python3 in 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 overrides my python 3.4 and makes it inaccessible, as in uninstalling and installing 3.6, but did not find any results.

Is there a safe way to upgrade python3 here

+6
source share
1 answer

This is a weird mistake, maybe something is wrong with your dpkg. You can always try to create python from the source. This works in a regular finished Ubuntu, so it should work on Windows as well.

 sudo apt-get install zlib1g-dev wget www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz tar -xf Python-3.6.0 cd Python-3.6.0 ./configure --enable-optimizations make sudo make install 

Save these commands in a file called python.sh, then run

 chmod 755 python.sh ./python.sh 

It may take some time, so be patient

0
source

Source: https://habr.com/ru/post/1015246/


All Articles