Friday, September 2, 2016

Building Python3 modules from FreeBSD ports

If you're like me, you will have python2.7 selected as the default interpreter in your TrueOS installation. However, some programs may require Python version 3 (and associated python3 modules). However, there aren't many py34 modules available using pkg install.

The solution to the problem is simple if you have a FreeBSD ports tree installed.

To build a port for a specific version of python, execute:
PYTHON_VERSION=pythonX.X make
Substitute X.X for the appropriate version that you require. Instead of the default py27-modulename, FreeBSD will build pyXX-modulename.

The default, of course, can be changed in make.conf (see man make.conf for details.)

No comments: