How can i Install python 3.7 on MX-19

Message
Author
raymccoy
Posts: 3
Joined: Thu Nov 28, 2019 3:48 am

How can i Install python 3.7 on MX-19

#1 Post by raymccoy »

How can i install python 3.7 on MXlinux 19?
And how can i then install pip like this
pip install -r requirements.txt

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: How can i Install python 3.7 on MX-19

#2 Post by JayM »

raymccoy wrote: Thu Dec 19, 2019 4:31 am How can i install python 3.7 on MXlinux 19?
You can't unless you want to break your operating system. Many things in MX depend on Python at its current version. MX is based on Debian Stable which is called that for a reason. Python 3.7.6 was only released yesterday which is hardly a well-tested, known-stable version. If you need the latest releases of things a distro based on Debian Unstable, or Sid, might be better for you.
And how can i then install pip like this
pip install -r requirements.txt
God only knows. What is pip?
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
asqwerth
Developer
Posts: 8043
Joined: Sun May 27, 2007 5:37 am

Re: How can i Install python 3.7 on MX-19

#3 Post by asqwerth »

pip is a program that helps install other python programs, I think.

I recall reading warnings on Manjaro forums against using pip in general to install python packages there; users there are advised usually to install via pacman or Manjaro's graphical installer, or using appropriate AUR helpers for any python programs in AUR.

Not sure if the position is the same in Debian-land.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
chrispop99
Global Moderator
Posts: 3434
Joined: Tue Jan 27, 2009 2:07 pm

Re: How can i Install python 3.7 on MX-19

#4 Post by chrispop99 »

Is there some special reason why you need (rather than want) that newer version?

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
baldyeti
Posts: 730
Joined: Sat Dec 05, 2009 3:37 pm

Re: How can i Install python 3.7 on MX-19

#5 Post by baldyeti »

python 3.7 seems to be available for MX19/buster
I think it is installed by default, but i am not in front of my MX box right now (you should have both "python" and "python3")
Otherwise just "sudo apt-get install python3" should do, then "sudo apt-get install python3-pip"
I _think_ you may then have to refer to "pip3" as "pip" will correspond to the python2 version.
Of course you can also just use the MX package installer instead of apt-get.
You may also want to install "python3-venv" (often used in conjunction with pip)
Last edited by baldyeti on Thu Dec 19, 2019 2:32 pm, edited 5 times in total.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: How can i Install python 3.7 on MX-19

#6 Post by JayM »

Baldyeti, I bow to you! I was searching MXPI for "python", not "python3" and when I do I see that python3 3.7.3-1 is already installed!
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
baldyeti
Posts: 730
Joined: Sat Dec 05, 2009 3:37 pm

Re: How can i Install python 3.7 on MX-19

#7 Post by baldyeti »

Hopefully the next major release of debian ("bullseye") should only have python3 as python2 will be unsupported by then, but buster still needs and defaults to v2.
Perhaps even some XFCE 4.14 add-ons still depend on python2, and maybe IIRC also the MX update tool.

User avatar
Buck Fankers
Posts: 770
Joined: Sat Mar 10, 2018 8:06 pm

Re: How can i Install python 3.7 on MX-19

#8 Post by Buck Fankers »

raymccoy wrote: Thu Dec 19, 2019 4:31 am How can i install python 3.7 on MXlinux 19?
And how can i then install pip like this
pip install -r requirements.txt
As already answered, python 3.7 is already installed on MX19. You need to type python3 in the terminal. Then pip will also work. With command you posted:

Code: Select all

pip install -r requirements.txt
you actually use pip to install other libraries, that project needs to get it working.

But a little caution. You are now installing libraries to your main (system) python. OK for first beginner projects, but all around better solution is, if you use different python, that is separated from your main, system python. Bellow is the link I used, to install mini conda, every step is explained, it is easy to do. Then, when done, you can then create new virtual environment and have your projects contained withing it. Say next year, you will for some project need python 3.8. Your main, python will still be 3.7 but inside mini-conda you will be able to use 3.8 version, with never libraries without risking to break the system. Here is the link:

https://www.dunderdata.com/blog/anacond ... onda-forge

User avatar
Stevo
Developer
Posts: 14907
Joined: Fri Dec 15, 2006 7:07 pm

Re: How can i Install python 3.7 on MX-19

#9 Post by Stevo »

The simple answer to the original question is that python3 3.7.3 is already installed by default.

MX Updater is already using just python3 and its qt5 bindings.

User avatar
say_hello
Posts: 158
Joined: Thu Jul 04, 2019 10:46 am

Re: How can i Install python 3.7 on MX-19

#10 Post by say_hello »

hello dear Stevo, hi Buck and baldyeti, JayM, chrispop99, asqwerth, raymccoy - dear Pythonists - dear experts here on MX-Linux, 9_9


i am on MX-linux which is great. I have set up a new machine with the version 19.1.


btw and on a sidenote: i have set up ATOM - i tried out to install VSCode (Codium) which failed. But i will go and stick to Atom and PyCharm untill some of the core-devs take care and add VSCode to the repos.

BTW; what about adding new Packages to Python - what about addding BeautifulSoup 4 (BS4) to Python!?

do i do this via pip install on the commandline!?

love to hear from you

regards
yours say


ps - regarding the VSCode in the repo: but there is no vscode (or even Codium) in the repos of MX-Linux.
This is a question regarding the setup of a development-environment on a MX-Linux Machine,
unfortunatly there is no VSCode in the repos - so i need some alternatives:
cf: viewtopic.php?f=55&t=55936&p=565840#p565840

Post Reply

Return to “Software / Configuration”