Python Forum
Starting to learn python on a Mac - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Starting to learn python on a Mac (/thread-6340.html)



Starting to learn python on a Mac - asifhoss - Nov-17-2017


I am starting to learn Python on my macbook. I have installed python version 2.7.13 and have text wrangler as a code editing app.

I am thinking of getting the book "Programming Python /Mark Lutz"

Any suggestions would be highly appreciated.

Thank you very much.


RE: Starting to learn python on a Mac - sparkz_alot - Nov-17-2017

As a new Python programmer, you should be using the latest Python version (currently 3.6.3), the 2.x.x versions are maintenance release only and will no longer be supported in 2020.  Mark Lutz is a good author, and hopefully the book you are getting is the 5th edition or greater.  Be sure and check out our List of Free Resources.


RE: Starting to learn python on a Mac - metulburr - Nov-17-2017

Learning Python
is actually hte first book. Programming Python is the second. I would do them in order. Learning python goes into python and general coding fundamentals while programming python goes into tkinter GUI and networking...it already assumes you have read the first book.

Learning Python by mark lutz is actually the book i used to learn python. I still have the 4th edition sitting here getting dusty now. It made a good reference book for many years. The programming python i read also, but i didnt like it as much. Once you read it, you dont really need it anymore like the first. You can acquire a lot of what is in programming python by blogs and tutorials online and get the same effect. Whereas in learning python, he goes quite deep into everything where blogs and tutorial do not go that far.

Also regardless of what he says, python2.x is going to be dead. Im sure the 6th edition wont even show py2 on it. Also the 5th edition is only up to python3.3. There are some cool features that python3.6 added that everyone should be aware of. But once you read learning python, you can just read the updates to python3.6 to get updated.


RE: Starting to learn python on a Mac - asifhoss - Nov-17-2017

(Nov-17-2017, 01:39 AM)sparkz_alot Wrote: As a new Python programmer, you should be using the latest Python version (currently 3.6.3), the 2.x.x versions are maintenance release only and will no longer be supported in 2020.  Mark Lutz is a good author, and hopefully the book you are getting is the 5th edition or greater.  Be sure and check out our List of Free Resources.

Thank you very much for your kind reply.

I am probably going to ask a ton of stupid questions till I am actually set up to learn and follow the instructions from the book on my machine. Till then, sorry all :(


RE: Starting to learn python on a Mac - iFunKtion - Nov-17-2017

If you are learning python on mac osx, I strongly suggest that you just bite the bullet and use Anaconda, you can get either python 2.7 or python 3, but I would strongly suggest python 3.

The main reason I recommend anaconda, is that is bypasses all the admin stuff of getting it to work properly on that mac. Mac OSX comes with python 2.7 as native, as it is used by the operating system, trying to install python 3 as a newby is very very frustrating, unless you are familiar with PATH and other bash syntax. However, learning python, you will end up learning these in the process.

Anaconda is self installing, and actually ends up being self contained within a folder in your Library and can just be deleted if you don't like it. But for learning with, it just saves a lot of heatache you will end up with most of the libraries you are likely to want to use.

https://www.anaconda.com/download/#linux

All you will have to remember is that you are using anaconda as opposed to python, so you will be using "conda install" as opposed to "pip install". The other beauty of Anaconda, is that is sorts out the PATH for you, so once installed, you simply go into a terminal window, type "python" and it will automatically go into the python3 prompt without messing with the python that interacts with your OS.

Enjoy, python is a fun language.


RE: Starting to learn python on a Mac - metulburr - Nov-17-2017

You can do the same with a python environment. Install to python but not your OS. No permissions as well.

more info here, scroll down to virtual environment

PS the only reason i know how to manually change a PATH variable in winblows is because i had to tweak it before python started doing it automatically. Sometimes its good to just dive in.


RE: Starting to learn python on a Mac - snippsat - Nov-17-2017

The Hitchhiker’s Guide advice for Python 3 on Mac OS X.
pyenv is great,make it easy to install and switch between version like eg Python 3.6 and Anaconda 3.6.
pyenv and Anaconda tutorial.


RE: Starting to learn python on a Mac - asifhoss - Nov-17-2017

Thank you very much everyone for the kind suggestions. I already installed the latest version of python my mac and already started reading/learning from the book mentioned above here.

I love the simplicity of python.


RE: Starting to learn python on a Mac - karaokelove - Jan-03-2018

You can also take MIT's Intro to Comp Sci Using Python 100% free at https://courses.edx.org/courses/course-v1:MITx+6.00.1x+2T2017_2/course/.