Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New to Python... Python 3 and Matplotlib [closed]

I want to learn Python. I have a course to do in Python 3. However, I will need to use mainly the matplotlib and Numpy, and these libraries are not yet compatible with Python 3. Is it worth doing the course in Python 3 or will be a waste of time to learn Python 3 and then came back to Python 2.x?

What would you do?

like image 296
André Avatar asked Jan 30 '11 17:01

André


3 Answers

FYI, Matplotlib is now ported to Python 3.

like image 130
Charles Brunet Avatar answered Nov 05 '22 09:11

Charles Brunet


You won't have a problem going back to Python 2.x after learning Python 3, or vice versa. There aren't too many differences. (Some standard library changes, print is a function, all strings are unicode -- you'll never notice most of them).

Realistically, if you learn Python 3 now, and get a job working with Python, you will almost definitely be working with Python 2.x for right now. Python 3 hasn't gained wide adoption yet. However, Python 3 will be more adopted in the near future, as a number of libraries are being ported to Python 3.

If you need to use Matplotlib specifically, then you should use Python 2.7 (no sense in using Python 3 right now if the library you need doesn't work for it). But learning Python 3 first will by no means put you at any disadvantage and may put you ahead of the curve when most people finally make the switch.

There's also nothing stopping you from using both (Python 3 for learning/experimenting, Python 2.7 for work).

like image 13
Rafe Kettler Avatar answered Nov 05 '22 09:11

Rafe Kettler


"What would you do?"

I would port matplotlib to Python 3. :-)

But no, a course in Python 3 is not wasted. The differences are mainly in the standard library, and in subtle internal differences.

The major differences in the language itself is that the unicode type is called str in Python 3, and that print is a function. The differences are not so big that a course is wasted.

like image 4
Lennart Regebro Avatar answered Nov 05 '22 11:11

Lennart Regebro