[pyngl-talk] Unable to import ngl
Kevin Hallock
hallock at ucar.edu
Wed May 8 13:59:57 MDT 2019
Hi Zilore,
If your laptop is a 32-bit system, then unfortunately I don’t think that the 64-bit anaconda3 or any of the pre-existing conda packages will work on your computer. It is generally possible to run 32-bit binaries on a 64-bit system, but not 64-bit binaries on 32-bit systems.
It is theoretically possible to build PyNGL and PyNIO on a 32-bit system, but because PyNGL requires NCL to be built as well, this process would likely be rather complicated and time consuming. You might be able to hack together a solution using the “ncl_ncarg-6.6.2-Debian7.11_32bit_gnu472.tar.gz” download of NCL on this page: https://www.earthsystemgrid.org/dataset/ncl.662.dap/file.html <https://www.earthsystemgrid.org/dataset/ncl.662.dap/file.html>
I tried to mimic the build environment used by the conda-forge PyNGL package (https://github.com/conda-forge/pyngl-feedstock/tree/master/recipe <https://github.com/conda-forge/pyngl-feedstock/tree/master/recipe> dependency packages in meta.yaml, build commands in build.sh), but ran into issues and am unable to spend more time working on it right now. Hopefully this info is enough to get you on the right track, but feel free to ask for advice if you hit any roadblocks.
I hope this helps,
Kevin
> On May 8, 2019, at 12:00 AM, Zilore Mumba <zmumba at gmail.com> wrote:
>
> Kevin,
> Thanks very much for the hints you gave me. I would like to run my scripts on a laptop which is 32 bit. I notice that both Nio.py and Ngl.py are in $HOME/anaconda3/lib/site-packages. I have added this to my LD_LIBRARY_PATH, but still the same problem. So looks like it is an architecture problem as you point out.
> I am thinking of installing 64-bit anaconda3 on top of 32-bit. Before I do that, would you advise that, or I have to install the current installation first?
> Thanks for your time
>
> On Wed, May 8, 2019 at 12:09 AM Kevin Hallock <hallock at ucar.edu <mailto:hallock at ucar.edu>> wrote:
> Hi Zilore,
>
> I think the “PackagesNotFoundError” from conda is due to the fact that you are running a 32-bit Linux OS, while the conda packages are explicitly 64-bit binaries. Would it be possible to use a 64-bit Linux virtual machine instead?
>
> When you installed PyNGL from source, were there any particular warning or error messages? Did you use conda to install the necessary dependencies, or did you use packages installed via apt-get?
>
> Thanks,
> Kevin
>
>> On May 7, 2019, at 3:31 PM, Zilore Mumba via pyngl-talk <pyngl-talk at ucar.edu <mailto:pyngl-talk at ucar.edu>> wrote:
>>
>> Hello, <mailto:pyngl-talk at ucar.edu>
>> I am trying to run python scripts for plotting data, from the ncl to python transition manual. The scripts call nio and ngl.
>> I have installed anaconda3 and created an ncl_to_python environment as follows:
>> conda create -n yourenvname python=x.x anaconda
>> conda activate ncl_to_python
>>
>> Then following here http://mailman.ucar.edu/pipermail/pyngl-talk/2019-February/000276.html <http://mailman.ucar.edu/pipermail/pyngl-talk/2019-February/000276.html>
>> I did:
>> conda update -c conda-forge —all
>> python -c "import Nio; print(Nio.__version__)"
>> the last command was giving me "no module NIO" as in the pyngl-talk post above. I have followed subsequent post and managed to install pynio with:
>> conda install gdal; conda update --all
>>
>> When I run the script I get:
>> Traceback (most recent call last):
>> File "TRANS_contour_lines_on_map.py", line 41, in <module>
>> import Ngl
>> ModuleNotFoundError: No module named 'Ngl'
>>
>> I have installed pyngl from source, but it does not seem to be seen. With
>> conda install -c conda-forge pyngl
>> or
>> conda install -c conda-forge/label/cf201901 pyngl
>> I get:
>> PackagesNotFoundError: The following packages are not available from current channels:
>> - pyngl
>> I am working on ubuntu 18.04 32 bit on VMware as a guest on Windows 10.
>> Assistance will be appreciated.
>> Zilore Mumba
>> _______________________________________________
>> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190508/f7d5131f/attachment-0001.html>
More information about the pyngl-talk
mailing list