version issues with numpy
Jamie Paul Griffin
jimpaulgriffin at gmail.com
Tue Jul 3 15:11:25 PDT 2012
On Tue, Jul 03, 2012 at 11:02:10PM +0100, Chris Jones wrote:
> Hi,
>
> Works fine for me
>
> Chris-Jones-Macbook-Pro ~ > sudo port select python
> Password:
> Available versions for python:
> none
> python25
> python25-apple
> python26
> python26-apple
> python27 (active)
> python27-apple
> python32
> Chris-Jones-Macbook-Pro ~ > sudo port select python python27
> Selecting 'python27' for 'python' succeeded. 'python27' is now active.
>
> Do you actually have macports python27 installed ? run 'sudo port install python27'
>
> cheers Chris
>
>
> On 3 Jul 2012, at 10:54pm, Jamie Paul Griffin wrote:
>
> > 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.
I was just about to correct myself and seen your replies. I googled and found:
# port select python python27
... which of course has worked perfectly.
cheers,
Jamie
More information about the macports-users
mailing list