Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to install Python 3.6?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
emil_21
Posts: 98
Joined: 2017-04-14 06:13

How to install Python 3.6?

#1 Post by emil_21 »

I need to install python 3.6 on debian stretch. How to do that?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: How to install Python 3.6?

#2 Post by bw123 »

emil_21 wrote: I need to install python 3.6 on debian stretch. How to do that?
https://duckduckgo.com/html/?q=install+ ... an+stretch
resigned by AI ChatGPT

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

#3 Post by emil_21 »

I followed this guide https://github.com/chriskuehl/python3.6-debian-stretch and installed python 3.6, but if i run 'python -V' it still shows version 2.7.13. Why is that?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: How to install Python 3.6?

#4 Post by dilberts_left_nut »

AdrianTM wrote:There's no hacker in my grandma...

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: How to install Python 3.6?

#5 Post by Dai_trying »

Simple answer:
type

Code: Select all

python3 -V

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

#6 Post by emil_21 »

Dai_trying wrote:Simple answer:
type

Code: Select all

python3 -V
If i type 'python3 -V' it shows 'Python 3.5.3'.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: How to install Python 3.6?

#7 Post by Dai_trying »

That shows you have both Python 2.7 and Python 3.5.

If you really want 3.6 or above you could try to install the latest version direct from the python website or backport the Buster version (both are V3.7). I am using Buster now which has 3.7.2+ by default.

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

#8 Post by emil_21 »

So, debian buster will have python 3.7? I guess i will wait until it is officially released and upgrade.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: How to install Python 3.6?

#9 Post by Dai_trying »

Yes, I usually keep a Testing installation to see how it is going, and have recently performed a fresh installation as the freeze has started. It has been pretty stable for me but my needs are quite simple and I generally keep software down to a minimum.
I don't think there is a vast difference between the versions though (3.5 - 3.7) so waiting might be the prudent option.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: How to install Python 3.6?

#10 Post by stevepusser »

emil_21 wrote:I followed this guide https://github.com/chriskuehl/python3.6-debian-stretch and installed python 3.6, but if i run 'python -V' it still shows version 2.7.13. Why is that?
What deb files did you install?
Did you read the instructions? They say it will not replace Python 3.5, so it will remain your default python3. I would imagine you'll have to run "python3.6" or something similar.
MX Linux packager and developer

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

#11 Post by emil_21 »

stevepusser wrote:
emil_21 wrote:I followed this guide https://github.com/chriskuehl/python3.6-debian-stretch and installed python 3.6, but if i run 'python -V' it still shows version 2.7.13. Why is that?
What deb files did you install?
Did you read the instructions? They say it will not replace Python 3.5, so it will remain your default python3. I would imagine you'll have to run "python3.6" or something similar.
I just copy the command:

Code: Select all

wget https://github.com/chriskuehl/python3.6-debian-stretch/releases/download/v3.6.3-1-deb9u1/{python3.6_3.6.3-1.deb9u1_amd64,python3.6-minimal_3.6.3-1.deb9u1_amd64,python3.6-dev_3.6.3-1.deb9u1_amd64,libpython3.6_3.6.3-1.deb9u1_amd64,libpython3.6-minimal_3.6.3-1.deb9u1_amd64,libpython3.6-stdlib_3.6.3-1.deb9u1_amd64,libpython3.6-dev_3.6.3-1.deb9u1_amd64}.deb
and then run the command 'sudo dpkg -i *.deb' and installed the downloaded packages.

I am trying to install electrum which require python 3.6. I first installed the dependencies with this command:

Code: Select all

sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
Then installed electrum with this command:

Code: Select all

sudo python3 -m pip install https://download.electrum.org/3.3.4/Electrum-3.3.4.tar.gz#egg=electrum[fast]
But i am not sure if it was installed correctly because it produced some output during the installation which i am not sure what it means.

But i am unable to start electrum. If i try to launch it from the command line i get this output:

Code: Select all

Traceback (most recent call last):
  File "/usr/local/bin/electrum", line 339, in <module>
    d.init_gui(config, plugins)
  File "/usr/local/lib/python3.6/dist-packages/electrum/daemon.py", line 326, in init_gui
    gui = __import__('electrum.gui.' + gui_name, fromlist=['electrum'])
  File "/usr/local/lib/python3.6/dist-packages/electrum/gui/qt/__init__.py", line 37, in <module>
    from PyQt5.QtGui import *
ModuleNotFoundError: No module named 'PyQt5.QtGui'

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: How to install Python 3.6?

#12 Post by stevepusser »

Again, "python3" is the default Stretch Python 3.5. You have to use "python3.6" to use 3.6. Try "python3.6 --version". No guarantees that Ubuntu packages are going to work, though.

Why don't you just use the Electrum Appimage instead, and forget all this monkeying around with PPAs and foreign debs? It uses an internal version of a newer Python.

I just rebuilt python3.7-3.7.2 from that PPA on a vanilla Stretch platform...it looks quite interesting.
MX Linux packager and developer

Post Reply