Skip to content

Python 3 migration

Daniel Kong edited this page Aug 24, 2016 · 4 revisions

Just making some notes about migrating to Python 3.

Compiling and installing Python 3:

./configure --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"

The --enable-unicode=ucs4 is unnecessary in Python versions >3.3, since unicode strings are now automatically represented in the most efficient way internally and you don't need to explicitly give UTF-32 support.

Make output:

The necessary bits to build these optional modules were not found:
_lzma

Database issues:

  • We need to use pymysql instead of mysql-python as the python driver.
  • Currently running into issues where pymysql doesn't detect the unix socket automatically the way mysql-python did. We may need to add a unix socket arg to the environment config or alternatively make the database actually listen to tcp ports.
  • Actually this was only an issue on OS X, since macports installs things in /opt instead of /usr/local. Linux is fine.
Clone this wiki locally