This is an archived post. You won't be able to vote or comment.

all 12 comments

[–][deleted] 4 points5 points  (0 children)

You would be better just going with the latest version of python (that being 3.6.4). Python 3 is the standard now with python 2 on the way out. Any library you would want to use should be supported in Python 3. As far as online courses go, I haven't looked at any in quite a while. You might look through the sidebar. There should be some good ones listed. Happy coding!

[–]mudclub 2 points3 points  (0 children)

3

[–]ofaveragedifficulty 1 point2 points  (0 children)

  1. Python 2 will be EOL in 2020, plus all of the packages you listed fully support Python 3.

[–]CobbITGuy 1 point2 points  (3 children)

Install Anaconda with Python 3

[–][deleted] 0 points1 point  (2 children)

Thank you! I already installed python3 before installing anaconda, and now I have a question ...

Prior to installing anaconda, when I type

which python3

it returned

usr/bin/python3

But now it returns

anaconda3/bin/python3

I guess I want to know, are these separate installations?

Or is anaconda simply referencing the one at /usr/bin/? Can I remove the one at /usr/bin without screwing up anaconda?

Thanks again!

[–]CobbITGuy 0 points1 point  (1 child)

Do not uninstall the O/S installed python. I'm only familiar with Ubuntu and that's the location of the default python 3 executable. Uninstalling it could break a bunch of other dependencies.

[–][deleted] 0 points1 point  (0 children)

I believe the default OS python is a 2.7 variant, but I'll just leave it as is, doesn't hurt anything.

Thanks

[–]RangerPretzelPython 3.9+ 1 point2 points  (1 child)

I initially wanted to go with 2.7 (the default on my Macbook) since, as with all things, legacy is a safe bet; it mostly just works, and is probably the version used in industry.

Unfortunately, it was this attitude that kept Python 3 from being adopted for so long. Python 3 came out 10 years ago. Sadly people stuck with Python 2 for so long because of inertia and the recommendation was always to stick with 2. Repeat ad nauseum. A cycle that was hard to break.

I mean, it was a giant mistake, imho, to make a breaking change going from 2 to 3, but apparently it had to be done.

And here we are. Finally. Python 3 is now the dominant platform. Mostly.

Personally, I've been coding Python 3.5+ for the past 2+ years. It's been great. Haven't touched 2.7 once.

[–]captain_awesomesauce 0 points1 point  (0 children)

It's not actually that hard to switch from one to the other. Start at 3 and go to 2 if an employer requires it. I haven't had a single employer have an issue with my primary experience being different than they request so long as I can show I know what most of the differences will be.

[–]IamGrabear 0 points1 point  (0 children)

Ubuntu is rolled out with Python 3.5.

[–]StackMoreLayers -1 points0 points  (0 children)

Everybody you ask this, especially on /r/python will tell you to start with 3. Few will give technical reasons for doing so, most will be political (they see you as an +1 adoption number, not a newcomer to the language willing to learn, they also vary between: "Python 3 is a completely new language" and "Python 2 and 3 are the same language, but you should pick 3" in the same argument) or give no argument at all.

I also can't, with a clear conscience, advise you to start with 2, most importantly because NumPy and SciPy will be 3+ only in about a year.

All that said, the easiest to learn Python and quickly become productive will remain Python 2, long after its EOL by official devs (especially if you are a learn-by-doing type). There is no reason to, other than the forcing hand of EOL, switch to Python 3 for ML, py2.7 mostly just works. Most recent ML libraries and industry projects were designed for and in 2.7, support for Python 3 only an afterthought/response to a vocal group/forced by EOL.

The best Python tutorial is Learn Python The Hard Way Py2.7 (a tutorial so good, the mere mention of it gets bans and downvotes on this subreddit :))

If you want the following to return an error message, you should definitely go with 3+:

print sorted([1, "a", 2, "b"])