Muffinresearch Labs by Stuart Colville

Fixing setuptools “TypeError: swig_sources()” error | 1 Comment

Posted in Code on 8th March 2009, 11:44 pm by

I was trying to update to a newer version of Jinja2 on osx to meet Zine dependencies and I got the following error:

Traceback (most recent call last):
[…snip…]
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/setuptools/command/build_ext.py", line 77, in swig_sources
    sources = _build_ext.swig_sources(self, sources) or sources
TypeError: swig_sources() takes exactly 3 arguments (2 given)

From the traceback it became clear that I was using an old version of setuptools.

Running:

$ locate /bin/easy_install
/usr/bin/easy_install
/usr/bin/easy_install-2.5
/usr/local/bin/easy_install
/usr/local/bin/easy_install-2.5

Showed I should be using /usr/local/bin/easy_install; so:
sudo mv /usr/bin/easy_install /usr/bin/easy_install.old

Resolved the problem.

Post Tools

  • Patrick

    Thank you! Found this through googling and it fixed my problem too!

GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(3)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.466s.