Conda installtion from specific local path

0 views
Skip to first unread message

Satish Sherikar

unread,
Jun 16, 2017, 11:36:36 AM6/16/17
to conda - Public
Hi,

I want to install ncl. But i have made one change in source code of ncl and that changed source code i want to install with conda.

Can you please tell me how to do so.

Regards,
Satish Sherikar

Satish Sherikar

unread,
Jun 19, 2017, 5:23:47 AM6/19/17
to conda - Public
Hi,

Can Anyone have update on this??

Regards,
Satish Sherikar

Ian Stokes Rees

unread,
Jun 19, 2017, 11:23:39 AM6/19/17
to Satish Sherikar, conda - Public

Hello Satish,

On 6/16/17 11:36 AM, Satish Sherikar wrote:

Hi,

I want to install ncl. But i have made one change in source code of ncl and that changed source code i want to install with conda.

You would need to re-build the conda package and then install your local version of the package. You’d probably want to start with this conda recipe (assuming you installed “ncl” in the first place from the “conda-forge” channel):

https://github.com/conda-forge/ncl-feedstock

You’d need to modify the recipe to use your locally modified version of NCL, instead of fetching NCL from github. IOW, you’d change this section:

https://github.com/conda-forge/ncl-feedstock/blob/master/recipe/meta.yaml#L7-L10

To be something that looked like this:

https://conda.io/docs/building/meta-yaml.html?highlight=source#source-from-a-local-path

But alternatively you can just compile and install NCL “in the normal way”, just specify your conda environment directory as the installation target. The generic pattern for autoconf-based installations is to do:

./configure --prefix=$CONDA_PREFIX
make && make install

NCL looks like it may require a variation on this, based on its build script:

https://github.com/conda-forge/ncl-feedstock/blob/master/recipe/build.sh

But you could probably just use that build script directly by downloading it into whatever directory contains the “Configure” NCL script and then you would do:

export PREFIX=$CONDA_PREFIX
bash ./build.sh

Of course you’d need to repeat those steps every time you wanted to to install your customized NCL into a new conda environment, and if you expect that to be “semi-regularly” then you are probably better off tweaking the conda-forge feedstock recipe for NCL, building your own local version of the package, and using conda to install that.

If your colleagues need to get it then you could upload it to your own Anaconda Cloud channel:

conda install anaconda-client
anaconda upload /path/to/conda/pkgs/ncl-other-stuff.tar.bz

One important note: you’ll need to manage the version and build numbers yourself so that conda will recognize your version of the conda package as “the latest available version”. I can’t give general advice on how to achieve that, so if it doesn’t appear your package is installing correctly then post back here and we can try to figure out what is going on and how to get things to work the way you need.

Regards,

Ian

Satish Sherikar

unread,
Jun 20, 2017, 2:53:52 AM6/20/17
to Ian Stokes Rees, spped...@gmail.com, conda - Public
Dear  Hans Hiasel and Ian Stokes Rees,

​Thank you for your valuable guidance.

I am working on this and let you know if there is any update.

Thank you once again.

Regards,
Satish Sherikar​

Satish Sherikar

unread,
Jun 20, 2017, 6:27:24 AM6/20/17
to Ian Stokes Rees, spped...@gmail.com, conda - Public
Hi,

I have installed Modified NCL through Conda successfully.

Thank you for your valuable support.

Regards,
Satish Sherikar.
Reply all
Reply to author
Forward
0 new messages