![]() This is the simplest installation procedure that most. You should obviously recompile all versions of MacPorts Python you use, as this bug isn’t isolated to 2.6.įor more detailed discussions on the bug, see:įor information on selecting the right compiler for MacPorts, see the wiki page. MacPorts version 2.7.2 is available in various formats for download and installation (note, if you are upgrading to a new major release of macOS, see the migration info page ): pkg installers for Monterey, Big Sur, and Catalina for use with the macOS Installer. If you want to do things properly by setting up your own local repository, see the MacPorts guide. But I imagine this bug will be fixed before you have to update Python again. The steps I described is a hack and the next time you perform port selfupdate your changes will be wiped out. Note that Python is now compiled with GCC 4.2.1. I add it in the # ensure that correct compiler is used section, before is used, like so:īuild.args-append MAKE="$"Īfter waiting for a while everything will be OK again: What’s easy to forget sometimes is selecting the version to use as the system’s default. On OSX, installing Python is fairly easy with MacPorts: sudo port install python27 sudo port install python34. MacPorts keeps a local version of available Python ports at: /opt/local/var/macports/sources//release/tarballs/ports/lang/įor example, Python 2.6 is at: /opt/local/var/macports/sources//release/tarballs/ports/lang/python26Įdit Portfile and add the following line: piler gcc-4.2 At least for the time being, I need both versions side by side. The easiest way to accomplish this is to edit the Portfile and for MacPorts to use a specific compiler. Note that Python is compiled with Clang 3.0. This causes all sorts of fun with decimal arithmetics, such as: With the latest Xcode 4.2, MacPorts uses clang as the default compiler. I use MacPorts for my Python installations. ![]() Compiling MacPorts Python on Lion using GCCĮdit: As of November 21, 2011, this is fixed. ![]()
0 Comments
Leave a Reply. |