How to install Python 3.6?

New to Debian (Or Linux in general)? Ask your questions here!

How to install Python 3.6?

Postby emil_21 » 2019-02-11 22:45

I need to install python 3.6 on debian stretch. How to do that?
emil_21
 
Posts: 47
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

Postby bw123 » 2019-02-11 23:03

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
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: How to install Python 3.6?

Postby emil_21 » 2019-02-13 09:05

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?
emil_21
 
Posts: 47
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

Postby dilberts_left_nut » 2019-02-13 09:23

AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4992
Joined: 2009-10-05 07:54
Location: enzed

Re: How to install Python 3.6?

Postby Dai_trying » 2019-02-13 13:05

Simple answer:
type
Code: Select all
python3 -V
Dai_trying
 
Posts: 706
Joined: 2016-01-07 12:25

Re: How to install Python 3.6?

Postby emil_21 » 2019-02-14 07:19

Dai_trying wrote:Simple answer:
type
Code: Select all
python3 -V


If i type 'python3 -V' it shows 'Python 3.5.3'.
emil_21
 
Posts: 47
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

Postby Dai_trying » 2019-02-14 08:38

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.
Dai_trying
 
Posts: 706
Joined: 2016-01-07 12:25

Re: How to install Python 3.6?

Postby emil_21 » 2019-02-14 10:46

So, debian buster will have python 3.7? I guess i will wait until it is officially released and upgrade.
emil_21
 
Posts: 47
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

Postby Dai_trying » 2019-02-14 21:37

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.
Dai_trying
 
Posts: 706
Joined: 2016-01-07 12:25

Re: How to install Python 3.6?

Postby stevepusser » 2019-02-15 03:37

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11007
Joined: 2009-10-06 05:53

Re: How to install Python 3.6?

Postby emil_21 » 2019-02-15 07:20

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'
emil_21
 
Posts: 47
Joined: 2017-04-14 06:13

Re: How to install Python 3.6?

Postby stevepusser » 2019-02-17 20:58

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11007
Joined: 2009-10-06 05:53


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable