Hi - I'm Linux noob and would like to learn Python. I believe that Python comes installed as part of the default install with MX Linux.
1. Is there anything else I need to install to get going?
2. Any recommendations for resources to start learning Python?
Thanks
Steve
Learning Python
- Buck Fankers
- Posts: 770
- Joined: Sat Mar 10, 2018 8:06 pm
Re: Learning Python
Hey Steve, welcome to Linux and MX community. You choose easy and fun Linux flavor with tons off goodies (MX Tools).sbrener wrote: Sun Nov 29, 2020 7:20 pm Hi - I'm Linux noob and would like to learn Python. I believe that Python comes installed as part of the default install with MX Linux.
1. Is there anything else I need to install to get going?
2. Any recommendations for resources to start learning Python?
You are correct, Linux comes with Python preinstalled. If you open a terminal and type into it: python you will end in python shell and you will be able to make your first command. But note, you would be running older version, python 2.7. To run newer version, type in terminal: python3 and then you can test it by typing in python shell this for example: print('test')
To exit, just close the terminal.
Actually, there is one package you should install first, go to MX Package Installer, click on tab: 'Stable Repo' and in search box (top right) enter: python3-pip
With this 'pip' you will then be able to install different kind of python packages. After few months, when you get a little bit comfortable with Python, you need to learn, how to use Python virtual environments, so your programming python will be isolated from your Linux, system python.
Resources... There is a LOT of free stuff online, for example this book is one of the most popular: http://automatetheboringstuff.com just scroll down where chapters start. Same link has links to few other books from the same author.
Here is another one that is free online.
https://www.slitherintopython.com/
These two should give you basic. Then the only way to keep going, to advance is to start working on some your own small projects. You will find out you didn't remember anything (at least that was with me, but I'm old) you will constantly look up example online, even for the simplest things, but that's ok, this is how you progress and slowly start learning and remembering.
Excellent site for beginners is this reddit, where you ask all python related beginner questions
https://www.reddit.com/r/learnpython/top/
For writing code you technically don't need anything else but simple text editor, but in reality, you do want to use some IDE (Integrated Development Editor) such as PyCharm (commercial, but free version is powerful also, students (in USA only?) get full version free. Very very popular is Microsoft's Visual Studio Code, that is free and you can also find it in MX Package Installer. These two are most popular but there are other. Each needs some upfront settings to do and for this you will need to watch some youtube videos.
Just open MX Package Installer and click on first tab: 'Popular Applications', click (expand) folder: 'Development' and inside you will see: 'MS-VSCode' click on box in front of the name and click on Install button at the bottom of the window.
Inside the same folder is also pretty popular IDE: 'Atom' you can try it also. I think it needs little bit more pre-configuring than VS Code, but many like it. Notice, in the same folder is also Geany, yet another IDE, the simplest one. Notice, how its name is in different color, darker, shaded. Why? Because it is already installed.
If you have lots of HDD space, if you don't mind that your MX Linux will almost double in size, :) check out some you tube guide about anaconda. It is interesting (but huge) package, comes with all kind of libraries you will need some time down the road, and many you never will, and it also comes with already integrated another IDE: Spyder which is probably the most suitable for beginner, it is simpler than two I mentioned earlier and it will work right out of the box, after you will install anaconda package.
Hmm, I just recalled, there is actually one even simpler IDE for absolute beginners, can't recall the name, maybe someone else will add this info. Edit, found it, it's name is Thonny and it is also in MXPI repository. Click on 'Stable Repo' tab and search (upper right corner) for Thonny
Check out past Corey videos, he made some very nice tutorials. Here is his watch list regarding setting up different python environments: https://www.youtube.com/watch?v=xFciV6E ... BKlMTuS55y
Hope I didn't intimidate you with the wall of text :-)
Be sure to create reddit account and ask any beginner questions in 'learnpython' as per my link above
Last edited by Buck Fankers on Mon Nov 30, 2020 5:00 am, edited 2 times in total.
Re: Learning Python
Learn Python the hard way comes highly recommended, I'm told: https://github.com/ubarredo/LearnPythonTheHardWay. I think you would actually have to buy the book though. The website just has a few sample chapters and lessons online, not the complete course. I'm pretty sure I saw the whole book online somewhere once but I can't find it again. maybe your GoogleFu is better than mine and you can find it as a free ebook.
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.
Re: Learning Python
Thanks for the feedback guys!
Re: Learning Python
Hi - I installed Microsoft's Visual Studio, but based on @buck's comments above, I need to do some configuration. There's very little on youtube about setting up MS Visual Studio on MX Linux - I have it installed and opened it up, but am not sure if there is additional configuration that needs to be done.
Thanks
Thanks
Re: Learning Python
On coursera there are some very nice courses :
https://www.coursera.org/learn/python?s ... ion=python
https://www.coursera.org/learn/learn-to-program
https://www.coursera.org/learn/interactive-python-1
Install an IDE of your choice. Geany Sublime / Visual Studio
Make sure you have the correct version of Python installed on your system, (2.xx or 3.xx).
.
https://www.coursera.org/learn/python?s ... ion=python
https://www.coursera.org/learn/learn-to-program
https://www.coursera.org/learn/interactive-python-1
Install an IDE of your choice. Geany Sublime / Visual Studio
Make sure you have the correct version of Python installed on your system, (2.xx or 3.xx).
.
Re: Learning Python
Might I ask, why start with Python? You are probably better off with something like Rust or C/C++ these days. PERL can come in handy too I suppose, but I don't know PERL myself, so probably not as essential as one might think.
Re: Learning Python
Seemed like it'd be fun to learn a lightweight programming language. Not sure if I want to invest my time in a C or C++. PERL would probably be an option but I've heard enough about Python that it sounds like a good place to start.
AK-47 wrote: Tue Dec 15, 2020 1:33 am Might I ask, why start with Python? You are probably better off with something like Rust or C/C++ these days. PERL can come in handy too I suppose, but I don't know PERL myself, so probably not as essential as one might think.
Re: Learning Python
Is there any customization that one needs to do after installing Visual Studio?
Thanks
Thanks
mxmatrix wrote: Mon Dec 14, 2020 10:55 pm On coursera there are some very nice courses :
https://www.coursera.org/learn/python?s ... ion=python
https://www.coursera.org/learn/learn-to-program
https://www.coursera.org/learn/interactive-python-1
Install an IDE of your choice. Geany Sublime / Visual Studio
Make sure you have the correct version of Python installed on your system, (2.xx or 3.xx).
.
Re: Learning Python
Sorry I never used Visual Studio.sbrener wrote: Wed Dec 16, 2020 3:05 pm Is there any customization that one needs to do after installing Visual Studio?
Thanks
I used Geany / Sublime (sometimes Atom).
You might have to set path in some cases.
Especially if you wish to use the version of Python that is not the default version of your system.
.