version issues with numpy

Jamie Paul Griffin jimpaulgriffin at gmail.com
Tue Jul 3 14:54:30 PDT 2012


On Tue, Jul 03, 2012 at 04:44:21PM -0400, Brandon Allbery wrote:
> On Tue, Jul 3, 2012 at 4:29 PM, James Long <jdlong at gmail.com> wrote:
> 
> > My newness to both Macports and Python are tripping me up, I am sure.
> > But I can't seem to get my mac to use the version of numpy which I
> > have installed with macports.
> >
> > If I run `port installed` I see the following:
> >
> > ...
> >   py27-ipython @0.12.1_0+scientific (active)
> > ...
> >   py27-numpy @1.6.2_0 (active)
> >
> > which leads me to believe I have ipython 0.12.1 and numpy 1.6.2
> >
> > This is confirmed when I fire up ipython and it tells me it's version
> > 0.12.1 and python is 2.7.3. So far, so good.
> >
> > From ipython if I `import numpy` and ask it for the version, it tells
> > me the following:
> >
> >
> > In [2]: import numpy
> >
> > In [3]: numpy.version.version
> > Out[3]: '1.5.1'
> >
> 
>     haral:34371 Z$ /usr/bin/python
>     Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
>     [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on
> darwin
>     Type "help", "copyright", "credits" or "license" for more information.
>     >>> import numpy
>     >>> numpy.version.version
>     '1.5.1'
> 
> I infer you're running the system python instead of MacPorts' python.
>  "sudo port select --set python27 python" should make MacPorts' python be
> the default instead of Apple's.

I just tried that command and it failed. I then thought it should be:
    sudo port select --set python2.7 python

but that failed also:

    # port select --set python2.7 python
    Selecting 'python' for 'python2.7' failed: The specified group 
    'python2.7' does not exist.

How would we/I get around that. I need to use the Macports python because I need py-gdbm which is already installed in Macports so I can build pyzor.

    Jamie


More information about the macports-users mailing list