[pyngl-talk] About using Pyngl/PyNio

Kevin Hallock hallock at ucar.edu
Mon May 15 17:34:40 MDT 2017


Hi Judy,

We chose to distribute NCL using the conda-forge conda channel. This provides compatibility with many other scientific software packages, with the extra requirement that any future “conda install …” commands include “-c conda-forge”.

In order to install matplotlib, try running “conda install -c conda-forge matplotlib”.

If you want to add the conda-forge channel as a default search option, you can run "conda config --add channels conda-forge”. This will make it so that you do not have to include the “-c conda-forge” flag, but it’s possible that installing packages from other channels in the future may cause version conflicts. In general, adding conda-forge as a default works well as long as you remember that you did it.

Kevin

> On May 15, 2017, at 5:24 PM, Tsai Judy <judytsaibuy at gmail.com> wrote:
> 
> Hi Kevin,
> 
> Thank you for your reply and suggestions.
> I've tried the first method but now I have another question: When I enter the pyn_test environment, I found that I cannot use some packages such as 'matplotlib' (see the error message below). Is it normal? Would that be avoided using the third method you provided? 
> 
> 
> (pyn_test) bash-4.1$ conda install matplotlib
> Fetching package metadata .........
> Solving package specifications: .
> 
> 
> UnsatisfiableError: The following specifications were found to be in conflict:
>   - matplotlib
>   - ncl
> 
> Thank you.
> 
> Judy
> 
> 2017-05-15 14:38 GMT-05:00 Kevin Hallock <hallock at ucar.edu <mailto:hallock at ucar.edu>>:
> Hi Judy,
> 
> There are several ways to get around having to execute “source activate pyn_test” every time you wish to use PyNIO. In my opinion, the best solution that still provides the benefits of using conda (namely, being able to switch environments) would be to simply append “source activate pyn_test” to your ~/.bashrc file.
> 
> Alternatively, you could explicitly add the pyn_test environment’s bin directory to your path, for example:
> export PATH=$HOME/miniconda2/envs/pyn_test/bin:$PATH
> 
> I haven’t used this method before, but I’d be concerned about conda not working correctly without the “$HOME/miniconda2/bin” directory also being included in your path (AFTER the environment directory).
> 
> Finally, you could theoretically install PyNIO into the “root” conda environment (which does not require “activation”) using the command:
> conda install -n root -c conda-forge pynio
> 
> The issue with this option is that if you try to install multiple packages from different channels into the root environment, you can run into version conflicts between packages. As such, unless you’re feeling adventurous I would recommend avoiding this solution and try one of the first two.
> 
> I hope this helps!
> Kevin
> 
>> On May 12, 2017, at 7:19 PM, Tsai Judy <judytsaibuy at gmail.com <mailto:judytsaibuy at gmail.com>> wrote:
>> 
>> Hi Pyncl-Talk,
>> 
>> I'm a new user of Python but a experienced using of NCL.
>> 
>> I've tried to install Pyngl/PyNio package on a linux cluster and a MacBook following this link: http://www.pyngl.ucar.edu/Download/ <http://www.pyngl.ucar.edu/Download/>
>> 
>> I think I successfully installed the package and I'm able to use this package.
>> However, I have to execute "source activate pyn_test" everytime I would like to use this package, instead of just do "import Nio", which would give me error.
>> 
>> Is it normal or do I miss something?
>> 
>> Thank you
>> 
>> Judy
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> 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/20170515/2e2ce781/attachment-0001.html 


More information about the pyngl-talk mailing list