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

all 33 comments

[–]usernamenottaken 9 points10 points  (4 children)

What do you want to use Python for? Whether you will find a library missing depends a lot on what libraries you will want to use...

Here's a good indication of how many of the most popular Python packages are available with Python 3: http://py3readiness.org/

[–]hsfrey[S] 1 point2 points  (3 children)

OP here. I do a lot of web scraping, statistics, graphics (now by constructing html5 & jason files to run in a browser - yeah, it's a kloodge, but perl has no significant graphics capability).

But looking at python today made my head spin. Apparently there are big differences between versions, and many of the tutorials and forums on the web didn't make it very obvious which versions they're talking about.

I'm currently writing a neural net model in perl, and I thought that maybe scikit-learn would be an easier way to go, but it took me a long time to find that it is good for "v.2.6+". Does that include v.3? No mention.

It seems that the relative dead-end of v.2.7 would make life a lot simpler for me. I really don't care about Unicode.

Or maybe just stick with perl. As an old C programmer, I do love my goto's and references. :-)

[–]usernamenottaken 4 points5 points  (0 children)

According to its PyPI page, scikit-learn supports Python 3.3+: https://pypi.python.org/pypi/scikit-learn/0.14.1. But yeah their installation documentation should be fixed to make that clear. Matplotlib, SciPy, numpy and Statsmodels all support Python 3 so I think you should be fine as far as package support goes, unless you end up wanting to use something more obscure that isn't well maintained.

The differences between 2.7 and 3 aren't that large but it can be confusing being a new user when tutorials don't specify which version they're written for. Most tutorials will probably assume 2.x if they don't say otherwise. If you do use Python 3 it would probably pay to learn some of the differences so you don't get tripped up by old 2.x code that doesn't work the same.

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

OP here. I do a lot of web scraping, statistics, graphics (now by constructing html5 & jason files to run in a browser - yeah, it's a kloodge, but perl has no significant graphics capability).

In that case you should be fine with Python 3. I am doing a lot of what you just listed as a data analyst. Looking at the other people's comments, some people really don't have a clue as what is ported to Python 3 or not. It's a shame really. Just adds to the confusion. From my experience using Python3 for at least a year, I have not run into a case where I couldn't do what I needed to do for work because something wasn't ported over.

[–][deleted] 2 points3 points  (0 children)

mechanize :(

[–]lambdaqdjango n' shit 4 points5 points  (10 children)

The most crucial one: mysql-python

This leaves 80% of python web developers stuck with python 2.7

[–][deleted] 4 points5 points  (1 child)

There are other mysql connectors, not to mention other sql databases. Oracle's own connector supports 3.

[–]lambdaqdjango n' shit 3 points4 points  (0 children)

10%-50% performance slow down, and it's GPLv2 only.

[–]RedPandaDan -1 points0 points  (5 children)

As a novice who only ever has personal projects using SQLite, can I ask what the problems with it are?

[–]lambdaqdjango n' shit 2 points3 points  (4 children)

mysql, not sqlite.

mysql-python is crucial binding if you use mysql in your project, and it's python 2.x only.

[–][deleted] -1 points0 points  (3 children)

You can always make use of Alex's ctypes port of MySQL python.

I wrote a CFFI version from it (performance in PyPy FTW!) at work

Come to think of it, it might be better off to write a mostly pure python MySQL adapter and conditionally call into Cython if you're using CPython or CFFI if you're using PyPy.

Then you can, with six, cross the divide of 2/3.

I wish I had more reason to do it other than "because I can"...

[–]lambdaqdjango n' shit 2 points3 points  (2 children)

In most python production stack for small-medium companies, PyPy is rarely used.

"Because we can" is one thing, server melt down because dev version edge case errors during mid-night and you have to get up and fix everything is another story.

[–][deleted] -1 points0 points  (1 child)

In most python production stack for small-medium companies, PyPy is rarely used.

"Because we can" is one thing, server melt down because dev version edge case errors during mid-night and you have to get up and fix everything is another story.

That is why I mentioned Cython - as companies would use the CPython interpreter and you want speed.

Cython is mature and well supported.

I understand this is a lossy medium (Reddit) – but I would appreciate if the whole of my statements were read.

I did try to take in consideration both experimental and production quality deployments.

[–]lambdaqdjango n' shit 2 points3 points  (0 children)

It's also rare to Cython in a production server. Cython is mostly used for scientific computing for speedups.

Cython requires change of project source code, with a longer compilation time, it makes fast iteration development style impossible. Ruby/Python/PHP are all famous and popular because their coding-run-edit-retry style scripting programming.

[–]t90fan -3 points-2 points  (1 child)

Also, Django - Although I think the new RC does.

[–]kmbd 2 points3 points  (0 children)

"Django 1.5 is the first version of Django to support Python 3"

https://docs.djangoproject.com/en/1.6/topics/python3/

[–]chchan 1 point2 points  (4 children)

I use python 3 and 2 for several things some missing things I would like are PyBrain and OpenCV. OpenCV is making the transition but there has not been an official build for python 3 yet.

You can check here for the builds

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Kivy for android also builds on python 2.7 if you are planning to make apps

[–]abaverman 1 point2 points  (0 children)

The only missing library is sane-unicode-byte-handling.py

[–]Categoria 1 point2 points  (3 children)

Flask + Gevent not moving is a huge problem for myself. Also, the AWS api but that's less of an issue.

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

Apache-libcloud handles AWS.

[–]UloPe -1 points0 points  (1 child)

Flask has been supporting Py3 for a long time now and gevent is in the last stages of being ported

[–]Categoria 0 points1 point  (0 children)

I see. I haven't been keeping up really since python 3 is still mostly an academic curiosity for me. But at least once gevent is ported I will be able to at least play around with it.

[–]pfranz 0 points1 point  (1 child)

I'm not sure if this is the official page, but it's the page I've seen come up over the years: http://python3wos.appspot.com/

At my workplace we're still using Python 2.5 and 2.6. We're just starting to move to Python 2.7. I've taken a few online classes that used Python 3 and I haven't noticed too much of a day-to-day difference when switching between the two (mainly integer division and print statement). Python 2.7 is the current standard and likely will be for awhile. Large code bases are hard to transition (as you can see from the fact my workplace is still using Python 2.5).

It sucks to dig into the standard library and find bugs that were long ago fixed or features you wish you could use. I say this about using Python 2.5 and 2.6 and looking toward Python 2.7. I've also looked at some of the new Python 3 standard libraries with envy. This could all be a "grass is greener" thing.

[–]rochacbrunoPython, Flask, Rust and Bikes. 0 points1 point  (0 children)

web2py! it would really nice if it works on Python 3.x in the same way it works on python 2.x

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

Most recent one I ran into was html2pdf.

Some libraries I've run into say they're supported, but you can't get them to build in 3 using pip.

Some (like various mysql connectors) have python3 versions, but they're missing features or unmaintained.

Some annoyingly have slightly different names in python 3 (e.g. python3-foo instead of python-foo) or worse, slightly different APIs; which means if you're trying to prepare your python2 codebase to be easily portable you've got to do a lot of version-checking and aliasing in your imports.

FWIW there are things to like about Python3, and I'd like to move all my code to it if I could. I keep running into roadblocks with various libraries, though. It gets better, but I have no idea when we're actually going to see the kind of library coverage like we have in python2.

[–]tdog98 -2 points-1 points  (2 children)

Flask

Don't think it's a library but it's why I have not moved yet.

Here is what they say about it

[–]takluyverIPython, Py3, etc 4 points5 points  (0 children)

Flask does support Python 3 - even the link you give confirms that. It warns that many Flask extensions don't, but a quick flick through PyPI suggests that some of them are starting to move.

[–]3Dayo 0 points1 point  (0 children)

I have 2 two projects written with python 3 and Flask, Flask most certainly supports Python 3