How can I install numpy on Python 3.1?

Solution 1:

The code from this branch of numpy appears to include a fix.
Here's a snippet and the relevant comments :

643         # XXX Hack to get numpy installable with easy_install.
644         # The problem is easy_install runs it's own setup(), which
645         # sets up distutils.core._setup_distribution. However,
646         # when our setup() runs, that gets overwritten and lost.
647         # We can't use isinstance, as the DistributionWithoutHelpCommands
648         # class is local to a function in setuptools.command.easy_install
649         if dist is not None and \
650                 repr(dist).find('DistributionWithoutHelpCommands') != -1:
651             return None
652         return dist

However, if you don't want to do that, try python3.1 setup.py install inside the directory where you extracted numpy. That avoids the easy_install issue described in the code comments.