[Texas] This Weekend: US PyCon 2011 Tutorial Dress Rehearsal in DFW
Brad Allen
bradallen137 at gmail.com
Sat Feb 12 12:09:36 CET 2011
Long ago I gave up on using the system Python for Mac OS X; it's
always better in my experience to build Python from source. After
downloading and decompressing the tarball, I usually cd into the
uncompressed Python directory, and run the following commands:
./configure --with-prefix=/Users/yourusername/python/python2.6
make
make install
Afterward, I make sure my PATH environment variable always has my own
Python ahead of the system Python. Usually this involves editing
~/.profile or ~/.bash_profile.
Then I install setuptools (or "distribute"), virtualenv, pip, and
yolk...and then try to keep that Python absolutely pristine, never
installing anything else.
Anytime I need to create a new working environment using third party
libraries, I always create either a virtualenv or a buildout. Those
packages get installed only within the working environment, not my
main Python environment. Virtualenvwrapper is a particularly handy
tool to increase working efficiency in dealing with virtualenvs.
Of course, I use this same approach in Linux, too. However, it's more
importnat in Mac OS X, where using the system Python is one big
exercise in frustration.
On Sat, Feb 12, 2011 at 3:26 AM, Paul Kippes <kippesp at gmail.com> wrote:
> I'm just starting as a OS X developer. But for those of you with OS X
> and want to experiment with PyQt, below are the instructions I've come
> up with to get your system configured. Since PyQt must be compiled
> from generated C++ code, it can take a good while to install.
>
> Install the XCode package which will install the gcc compiler.
>
> Download the Python for OsX from http://python.org. Install Python
> using the default settings.
>
> Download (at least) the Qt Framework libraries for Mac.
>
> Start a new Terminal and verify it is using the preferred Python::
>
> which python
> python --version
>
> Download SIP from Riverbank Software
> (http://www.riverbankcomputing.co.uk/software/sip/download).
> Untar the `sip` package and install it::
>
> python configure.py
> make
> sudo make install
>
> Download PyQT from Riverbank Software
> (http://www.riverbankcomputing.co.uk/software/pyqt/download).
> Untar the 'PyQt' package and install it::
>
> python configure.py
> make
> sudo make install
>
More information about the Texas
mailing list