<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I tried a simpler installation, and still has problems as below. Do you know if any hidden cache might be left in my Mac home account that might cause problems? Since I installed Enthought Canopy in my home directory too (before my old working anaconda),
when I was cleaning up anaconda installations, I was afraid I might delete something belongs to Canopy. But I did remove the anaconda entire folder.</div>
<div><br>
</div>
<div>conda create -n pyncar -c conda-forge pynio pyngl</div>
<div>Source activate pyncar</div>
<div><br>
</div>
<div>
<div>(pyncar) FXG-MacBook:~ xng02546$ python</div>
<div>Python 2.7.12 | packaged by conda-forge | (default, Sep 8 2016, 14:41:48) </div>
<div>[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin</div>
<div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> </div>
<div>>>> import Nio</div>
<div>Traceback (most recent call last):</div>
<div> File "<stdin>", line 1, in <module></div>
<div> File "/Users/xng02546/anaconda2/envs/pyncar/lib/python2.7/site-packages/PyNIO/Nio.py", line 83, in <module></div>
<div> from nio import *</div>
<div>ImportError: dlopen(/Users/xng02546/anaconda2/envs/pyncar/lib/python2.7/site-packages/PyNIO/nio.so, 2): Symbol not found: ___sincos_stret</div>
<div> Referenced from: /Users/xng02546/anaconda2/envs/pyncar/lib/libgdal.20.dylib</div>
<div> Expected in: /usr/lib/libSystem.B.dylib</div>
<div> in /Users/xng02546/anaconda2/envs/pyncar/lib/libgdal.20.dylib</div>
<div>>>> import Ngl</div>
<div>>>> print Ngl.__version__</div>
<div>1.5.0_beta20161122</div>
<div>>>> print Nio.__version__</div>
<div>Traceback (most recent call last):</div>
<div> File "<stdin>", line 1, in <module></div>
<div>NameError: name 'Nio' is not defined</div>
<div>>>></div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Xingang Fan <<a href="mailto:xingang.fan@wku.edu">xingang.fan@wku.edu</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, December 15, 2016 11:18 PM<br>
<span style="font-weight:bold">To: </span>Kevin Hallock <<a href="mailto:hallock@ucar.edu">hallock@ucar.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>" <<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>>, Bill Ladwig <<a href="mailto:ladwig@ucar.edu">ladwig@ucar.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [pyngl-talk] Help with PyNIO installation<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Dear Kevin and Bill:</div>
<div><br>
</div>
<div>I really appreciate your patience with me and help. I am kind of new to the python packages and just don't know how to interpret the error messages.</div>
<div>The following was what I did, considering your suggestions:</div>
<div><br>
</div>
<div>FIRST:</div>
<div>Deleted the anaconda2 directory along with .conda .condrc </div>
<div>Reinstalled anaconda2: bash Downloads/Anaconda2-4.2.0-MacOSX-x86_64.sh</div>
<div>condo update condo</div>
<div>conda update -- all</div>
<div><br>
</div>
<div>With these, python and spyder (newest version) starts well.</div>
<div><br>
</div>
<div>THEN: </div>
<div>conda config --add channels conda-forge # This makes the installation to search packages first from conda-forge #</div>
<div>
<div>conda create -n test -c conda-forge pynio pyngl netcdf4 basemap spyder</div>
<div>source activate test</div>
<div>python Downloads/Basemaps_US_01.py</div>
</div>
<div><br>
</div>
<div>TESTING RESULTS:</div>
<div>spyder (2.3.9) starts well, but running one of my code (tested okay in earlier installations) had problems with either matplotlib or basemap. So, I also run it from command line.</div>
<div>The problems are shown below. Right following it, is the attempt to import Nio directly from running python at command line:</div>
<div><br>
</div>
<div>
<div>(test) FXG-MacBook:~ xng02546$ python Downloads/Basemaps_US_01.py </div>
<div>Traceback (most recent call last):</div>
<div> File "Downloads/Basemaps_US_01.py", line 1, in <module></div>
<div> from mpl_toolkits.basemap import Basemap</div>
<div> File "/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 28, in <module></div>
<div> from matplotlib.collections import LineCollection, PolyCollection</div>
<div> File "/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/matplotlib/collections.py", line 24, in <module></div>
<div> import matplotlib.transforms as transforms</div>
<div> File "/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/matplotlib/transforms.py", line 39, in <module></div>
<div> from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,</div>
<div>ImportError: dlopen(/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/matplotlib/_path.so, 2): Symbol not found: ___sincos_stret</div>
<div> Referenced from: /Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/matplotlib/_path.so</div>
<div> Expected in: /usr/lib/libSystem.B.dylib</div>
<div> in /Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/matplotlib/_path.so</div>
<div><br>
</div>
<div>(test) FXG-MacBook:~ xng02546$ which python</div>
<div>/Users/xng02546/anaconda2/envs/test/bin/python</div>
<div><br>
</div>
<div>(test) FXG-MacBook:~ xng02546$ python</div>
<div>Python 2.7.12 | packaged by conda-forge | (default, Sep 8 2016, 14:41:48) </div>
<div>[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin</div>
<div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import Nio</div>
<div>Traceback (most recent call last):</div>
<div> File "<stdin>", line 1, in <module></div>
<div> File "/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/PyNIO/Nio.py", line 83, in <module></div>
<div> from nio import *</div>
<div>ImportError: dlopen(/Users/xng02546/anaconda2/envs/test/lib/python2.7/site-packages/PyNIO/nio.so, 2): Symbol not found: ___sincos_stret</div>
<div> Referenced from: /Users/xng02546/anaconda2/envs/test/lib/libgdal.20.dylib</div>
<div> Expected in: /usr/lib/libSystem.B.dylib</div>
<div> in /Users/xng02546/anaconda2/envs/test/lib/libgdal.20.dylib</div>
<div>>>> import Ngl</div>
<div>>>> </div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Xingang</div>
<div><br>
</div>
<div>P.s. I had a successful installation before on this computer. It was messed up when I tried to update the pyngl and pynio from condo-forge. However, I forgot how I installed them the first time. I might have installed from downloading the .zip files from
Github and then use pip. The only thing I didn't have was pygrib. This was the reason why I attempted to update my previous working system (all under root env), because on a Ubuntu virtual machine system, all three of pyngl pynio and pygrib were successfully
installed and can be imported without problem. While keep trying an easy install, I will see if I can repeat my old installation.</div>
<div><br>
</div>
<div>I really need an easy procedure, so that the students would be able to follow on their own Mac system. For Windows machine, the virtual machine I created can be imported into their VirtualBox.</div>
<div><br>
</div>
<div>Thanks again for your help!</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Kevin Hallock <<a href="mailto:hallock@ucar.edu">hallock@ucar.edu</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, December 15, 2016 1:14 PM<br>
<span style="font-weight:bold">To: </span>Xingang Fan <<a href="mailto:xingang.fan@wku.edu">xingang.fan@wku.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>" <<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [pyngl-talk] Help with PyNIO installation<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Xingang,
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
(I) At Conda root, I ran:</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
conda create -n metuse -c conda-forge pynio pyngl</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
source activate met use</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
(II) From root, I created a new environment condaX by:</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Conda create –n condaX python=2.7 anaconda</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Source activate condaX</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Conda install netcdf4</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Conda install basemap</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Conda update --all</div>
<br class="Apple-interchange-newline">
</div>
</blockquote>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">
<blockquote type="cite" class="">
<div class="">(III) Based on the working condoX environment, I tried to clone it, then wanted to install pyNGL etc., </div>
<div class=""> The cloned environment has same results from conda list, </div>
<div class=""> Running python, it imports matplotlib and basemap okay,</div>
</blockquote>
<blockquote type="cite" class=""> But, somehow, spyder won't start, it shows the following message:</blockquote>
<div class=""><br class="">
</div>
<div class="">
<div class="">Instead of creating these two separate environments and then trying to combine them, could you please try creating a single environment using the following command:</div>
</div>
<div class="">
<div style="font-family: Helvetica; font-size: 12px;" class=""><font face="Courier New" class="">conda create -n pyn_testing -c conda-forge python=2.7 pynio pyngl netcdf4 basemap spyder</font></div>
</div>
<div class="">
<div style="font-family: Helvetica; font-size: 12px;" class=""><font face="Courier New" class="">source activate pyn_testing</font></div>
</div>
</div>
<div class=""><br class="">
</div>
</div>
<div class="">Even though both of the environments work before combining them, I would expect them to fail due to incompatible versions of packages. For example, in your “metuse” environment you should have libnetcdf 4.4.1.1 from conda-forge installed as a
dependency of pynio; in your “condaX” environment, you’ll have libnetcdf 4.4.1 from the default channel installed as a dependency of netcdf4. This is just one example of the incompatibilities that can happen when installing from multiple channels. Again, it
is important to use “-c conda-forge” on any “conda create …”/“conda install …”/“conda update …” commands you may run for the environment you’re trying to create.</div>
<div class=""><br class="">
</div>
</div>
<div class="">Also, I noticed that you chose to install the anaconda package when creating the condaX environment (in step II above). Installing the “anaconda” package is almost guaranteed to make your environment incompatible with most packages from the conda-forge
channel (including pynio and pyngl), as described in the previous paragraph. Is there a particular package included in “anaconda” that you need? I would try to list specific packages instead of “anaconda”, and I would try to install them from the conda-forge
channel (“-c conda-forge”) if possible.</div>
<div class=""><br class="">
</div>
<div class="">I hope this helps!</div>
<div class=""><br class="">
</div>
<div class="">Kevin</div>
</div>
</div>
</span></div>
</div>
</span>
</body>
</html>