Re: PyNGL/PyNIO on Mac OSX libc++ error?

From: Madeline Miller <madelinem_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 23 2013 - 19:16:11 MDT

Hi Daryl,

Thanks for this clarification; as you can tell I'm new to python. Now it
seems the basic PyNGL examples are working so I just need to sort out
PyNIO.

Madeline

On Tue, Apr 23, 2013 at 4:49 PM, daryl herzmann <akrherz@iastate.edu> wrote:

> Madeline,
>
> pynglex is a python script itself and can be run without invoking python
> first. You should be able to do simply this from the command line
>
> pynglex -l
>
> That assumes pynglex is in your $PATH variable and is set executable.
>
> The python triple prompt is for running python code interactively and not
> necessarily whole python scripts. Typically whole python scripts are run
> by:
>
> python myscript.py
>
> So you could try running pynglex like
>
> python pynglex -l
>
> daryl
>
>
> On Tue, 23 Apr 2013, Madeline Miller wrote:
>
> Oh, I had already switched the #!, but python still is not recognizing
>> pynglex as a command. I am running python interactively and type the
>> command "pynglex -l" at the prompt. It returns:
>>
>>> pynglex -l
>>>>>
>>>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> NameError: name 'pynglex' is not defined
>>
>> I tried doing this in the folder where pynglex resides, but that doesn't
>> change the result.
>>
>>
>> On Tue, Apr 23, 2013 at 3:13 PM, Mary Haley <haley@ucar.edu> wrote:
>>
>>
>>> Let me check on the version of gcc when I get home.
>>>
>>> I had a typo in my pynglex correction.
>>>
>>> It should be:
>>>
>>> #!/usr/bin/env python
>>>
>>>
>>> --Mary
>>>
>>> On Apr 23, 2013, at 4:08 PM, Madeline Miller wrote:
>>>
>>> Hi Mary,
>>>>
>>>> Is there a way to modify a path variable in one of the PyNGL/PyNIO files
>>>>
>>> to point to another installed gcc version to run those functions, or does
>>> my version of Python need to be re-compiled with the newer gcc to make
>>> this
>>> work?
>>>
>>>>
>>>> Modifying that line in the pynglex file did not fix the problem; could
>>>>
>>> this be related to the gcc issue as well?
>>>
>>>>
>>>> Thanks,
>>>>
>>>> Madeline
>>>>
>>>>
>>>> On Tue, Apr 23, 2013 at 2:00 PM, Mary Haley <haley@ucar.edu> wrote:
>>>> Hi Madeline,
>>>>
>>>> I believe this issue has to do with the version of gcc that PyNGL was
>>>>
>>> compiled with.
>>>
>>>>
>>>> This was on my home Mac, so I can't verify which gcc this was built
>>>>
>>> with. I *think* it was 4.5.0,
>>>
>>>> which will certainly be an issue trying to link against your 4.2.1
>>>>
>>> version.
>>>
>>>>
>>>> Do you have any other versions of gcc that you can point to on your
>>>>
>>> system?
>>>
>>>>
>>>> The pynglex problem is a bug on my part.
>>>>
>>>> You should be able to edit this file directly and change the top line to
>>>>
>>> read:
>>>
>>>>
>>>> !#/usr/bin/env python
>>>>
>>>>
>>>> --Mary
>>>>
>>>> On Apr 23, 2013, at 10:46 AM, Madeline Miller wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I am having some issues getting PyNGL and PyNIO installed.
>>>>> I am using the most recent pre-compiled binaries for Mac OS X, Python
>>>>>
>>>> 2.7 and NumPy 1.6.
>>>
>>>>
>>>>> PyNIO-1.4.1.macos-10.6-x86_64-**py271-numpy160-nodap.tar.gz
>>>>> PyNGL-1.4.0.macos-10.6-x86_64-**py271-numpy160.tar.gz
>>>>>
>>>>>
>>>>> These are the details of my operating system/other installations:
>>>>>
>>>>> Mac OSX 10.6.8 (Snow Leopard)
>>>>>
>>>>> Python 2.7.3 installed with MacPorts, using GCC 4.2.1
>>>>>
>>>>> file `which python` returns:
>>>>> /opt/local/bin/python: Mach-O 64-bit executable x86_64
>>>>>
>>>>> After installing PyNIO and PyNGL in the python directories, I start
>>>>>
>>>> python and try to import Nio and Ngl:
>>>
>>>>
>>>>>
>>>>> import Nio
>>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in <module>
>>>>> File
>>>>>
>>>> "/opt/local/Library/**Frameworks/Python.framework/**
>>> Versions/2.7/lib/python2.7/**site-packages/PyNIO/Nio.py",
>>> line 63, in <module>
>>>
>>>> from nio import *
>>>>> ImportError:
>>>>>
>>>> dlopen(/opt/local/Library/**Frameworks/Python.framework/**
>>> Versions/2.7/lib/python2.7/**site-packages/PyNIO/nio.so,
>>> 2): Symbol not found: ___emutls_get_address
>>>
>>>> Referenced from: /usr/local/lib/libstdc++.6.**dylib
>>>>> Expected in: /usr/local/lib/libgcc_s.1.**dylib
>>>>> in /usr/local/lib/libstdc++.6.**dylib
>>>>>
>>>>> Does anyone know what might be the issue or how to fix this?
>>>>>
>>>>>
>>>>> There are no errors for import Ngl, but
>>>>>
>>>>> pynglex -l
>>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in <module>
>>>>> NameError: name 'pynglex' is not defined
>>>>>
>>>>> I put the binaries pynglex and pynglex 2.7 in the folder:
>>>>> $PYTHONPREFIX/bin
>>>>>
>>>>> Should they go somewhere else?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Madeline
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ______________________________**_________________
>>>>> pyngl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/**mailman/listinfo/pyngl-talk<http://mailman.ucar.edu/mailman/listinfo/pyngl-talk>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
> --
> /**
> * Daryl Herzmann
> * Assistant Scientist -- Iowa Environmental Mesonet
> * http://mesonet.agron.iastate.**edu <http://mesonet.agron.iastate.edu>
> */
>

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Apr 23 19:16:41 2013

This archive was generated by hypermail 2.1.8 : Fri May 03 2013 - 07:37:28 MDT