Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Python 3 Version (SOLVED)

barnaby
Forum Novice
Forum  Novice
Posts: 37
Joined: Sun Nov 11, 2018 2:38 pm

Python 3 Version (SOLVED)

#1

Post by barnaby » Thu Dec 20, 2018 5:40 pm

I am fairly new to MX but not to Linux. So far one of the things that has impressed me with MX is that so many programs are available, and in recent versions too. Some of them it seems are there at the request of users. For example I use the palemoon browser a lot. I was delighted to find it waiting in the repos. And it is kept up to date. Now I use the Python programming language a lot, and in fact teach it to young people in the local youth centre. They mostly use MS Windows on their laptops, and normally it is version 3.7 that they get when they install it.

I am somewhat surprised to find that, in MX, I am stuck with version 3.5, which was released more that three years ago. It is now way out of date. The current release is 3.7.1 and version 3.8 should be out fairly soon. So my question is, why is Python so far behind with its versions on MX, while so may other packages a right up to date? or am I missing something somewhere? And yes, I have upgraded MX to version 18.
Last edited by barnaby on Fri Dec 21, 2018 3:11 pm, edited 1 time in total.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 19345
Joined: Fri Dec 15, 2006 8:07 pm

Re: Python 3 Version

#2

Post by Stevo » Thu Dec 20, 2018 6:17 pm

It's because MX is based on Debian Stable, which had its base system packages frozen in late 2016, and we are leary of updating that base, which usually results in the system breaking. We've found that we have been able to backport Python 3 programs up to now with the current 3.5.

You may be able to manage newer Python versions with pyenv without breaking the system, though: https://github.com/pyenv/pyenv-installer

barnaby
Forum Novice
Forum  Novice
Posts: 37
Joined: Sun Nov 11, 2018 2:38 pm

Re: Python 3 Version

#3

Post by barnaby » Thu Dec 20, 2018 6:37 pm

Thanks for the quick reply. I did not realise that Python would count as a base system package. Thanks for your suggestion, which I will look into. It is a bit embarrassing to work with young people on Windows using versions 3.7, while I am on Linux stuck with 3.5. And I am also trying to get them to consider moving on to Linux at the same time as training them. Plus, version 3.7 especially has quite a few updates and changes. So some of the things I am trying to talk about don't appear in 3.5.
Also I suppose I could also look at pipenv. At least I now know that a more up to date version is not going to be available in MX repos for a while yet.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 19345
Joined: Fri Dec 15, 2006 8:07 pm

Re: Python 3 Version

#4

Post by Stevo » Thu Dec 20, 2018 7:47 pm

Not until we do a Debian 10-based version, which currently has 3.7.2 rc1.

However, if you're feeling adventuresome, it should be possible to upgrade to a Debian 10 (testing/buster) base in MX 17 right now. Let me test that now in a virtual machine...it worked fine a few months ago, though I know we now have a newer kernel than Buster has in MX 18. This'll take a while.

skidoo
Forum Guide
Forum Guide
Posts: 1420
Joined: Tue Sep 22, 2015 6:56 pm

Re: Python 3 Version

#5

Post by skidoo » Fri Dec 21, 2018 12:52 am

which I will look into
https://tecadmin.net/install-python-3-7 ... linuxmint/ <<<<<< these howto instructions suggest it's a breeze
https://docs.python.org/3/using/unix.html <<<<<< TL;DR? These docs... it'll be past suppertime by the time ya wade through "all that"

barnaby
Forum Novice
Forum  Novice
Posts: 37
Joined: Sun Nov 11, 2018 2:38 pm

Re: Python 3 Version

#6

Post by barnaby » Fri Dec 21, 2018 4:10 am

I have been thinking about this. I have checked around the internet and it is possible to download Python 3.7 for Linux and to install it myself. It is a bit fiddly, but I have done such things before. If I did just that and had 3.7 installed, would it cause any problems? (Some while ago on another computer of mine, which is not yet running MX, I installed version 3.6.7, which was the latest at the time. It works just fine. Though, as I said, that was not on MX.)

User avatar
baldyeti
Forum Regular
Forum Regular
Posts: 198
Joined: Sat Dec 05, 2009 4:37 pm

Re: Python 3 Version

#7

Post by baldyeti » Fri Dec 21, 2018 4:29 am

You could install your own 3.7 without overwriting the system python3 (say, compile yourself, use miniconda or activepython ...), perhaps under /usr/local/python37 or /opt/python37. You can also define a bash alias (e.g py37 pointing to your upgraded version). Not that different from already having both python2 and python3 anyway.

Then if you get into the (good) habit of using venv for every project, the correct python interpreter used to setup that particular project gets remembered and automatically invoked once the project is activated.

Out of curiosity, what are the breakthrough features 3.7 brings to the table ?

barnaby
Forum Novice
Forum  Novice
Posts: 37
Joined: Sun Nov 11, 2018 2:38 pm

Re: Python 3 Version

#8

Post by barnaby » Fri Dec 21, 2018 8:13 am

There are many changes with v3.7, too many to list. There are some reports you can find on the internet. An important one for me is some new layouts for printing. The new ones do not work in
v3.5. There are some new keywords to beware of. Dictionaries can now be ordered. Importing data has changed. Have a look at the URL below. And these are the changes since v3.6, which already had some changes from v3.5.

https://realpython.com/python37-new-fea ... hancements

barnaby
Forum Novice
Forum  Novice
Posts: 37
Joined: Sun Nov 11, 2018 2:38 pm

Re: Python 3 Version

#9

Post by barnaby » Fri Dec 21, 2018 9:14 am

I have decided on another way to do this. I have installed anaconda, which gives me several choices of programs to run. If I choose the console I see that it is using Python v3.7 which is great. Anaconda is quite a program. Wow.

User avatar
baldyeti
Forum Regular
Forum Regular
Posts: 198
Joined: Sat Dec 05, 2009 4:37 pm

Re: Python 3 Version

#10

Post by baldyeti » Fri Dec 21, 2018 9:46 am

Yes, i had former colleagues who swore by anaconda. It looks bulky to me, though, which is why i suggested miniconda but the main point is not to overwrite the system version nor fiddle with repos, just using a parallel and distinct python stack should be fine.

Post Reply

Return to “Desktop Environment”