version issues with numpy

Chris Jones jonesc at hep.phy.cam.ac.uk
Tue Jul 3 15:02:10 PDT 2012


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.
> 
>    Jamie
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2966 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120703/e65c9e37/attachment.bin>


More information about the macports-users mailing list