How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

Mensanator mensanator at aol.com
Thu Dec 24 21:11:19 EST 2009


Ok, so I got a MacBook Air.

Has OS X 10.6 (Snow Leopard) and Python 2.6.1 already installed.

So I install Xcode, download macports and download gmpy-1.11rc1.

Following the instructions in mac_build.txt, I do the following:

- sudo /opt/local/bin/port install gmp

This works fine.

Then I do

- python setup.py install

This also works (a few warnings, but nothing looked serious).

Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy
>>> gmpy.version()
'1.11'

python gmpy_test.py
Unit tests for gmpy 1.11
    on Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)]
Testing gmpy 1.11 (GMP 4.3.1), default caching (100, 128)
gmpy_test_cvr 151 tests, 0 failures
.
.
.
  25 tests in gmpy_test_rnd.__test__.rand
1469 tests in 42 items.
1469 passed and 0 failed.
Test passed.

Looks like a viable gmpy module for 2.6.

What do I do AFTER I install Python 3.1? Just running python3.1 from
the
same directory doesn't work.

I've spent the last 5 days trying to figure that out. I hosed it so
bad
I somehow wrecked the 2.6 version to the point where it won't even
load.

I just got done doing a factory restore of the entire OS to undo
everything
I did. Re-did all the above and got it back working. Haven't re-
installed 3.1
yet.

Anbody have any idea how to make this work?



More information about the Python-list mailing list