You need to tell setup.py where to find the libraries you installed. Get the Python 3.0 source code and unpack it. If that works, then you are ready to build Python. Once that is done then open Terminal/iTerm and enter: If you don't have it already you can download the MacPorts installer to set things up. One of the easiest ways to do that is to use MacPorts (aka DarwinPorts). The steps below detail my method for adding readline (and gdbm which you can skip if you don't want it) support to Python 3.0 (this probably works with other Python versions too).įirstly, install the readline and gdbm libraries. To find the necessary bits, look in setup.py in detect_modules() for the module's name. You will see something like this:įailed to find the necessary bits to build these modules: ![]() You can tell when readline isn't going to be included by examining the end of the make output. Luckily, this is easily fixed so keep reading. The problem is that Apple doesn't provide a readline library (due to licensing issues they offer a functionally similar but different library called editline) so by default Python builds without readline support and hence no editing/history support. ![]() You know, using cursor keys to edit the command-line and access history. However, without some tweaking, you usually end up with a Python interpreter that lacks line-editing capabilities. Chrismiles Python 3.0 is out now and even though an OS X package isn't available yet, it is easy to build from source on a Mac.
0 Comments
Leave a Reply. |