1

I try to create my own (first) conda package, spent the recent evenings tabbing between google, stack-overflow and my terminal. I am stuck on the following:

I can successfully build from my project (named mcm) directory with conda build .. After that, I find as expected the tarball in <my-dev-env>/conda-bld/noarch/mcm-v1.0a4-py_0.tar.bz2.

Now I would find it natural to test the package in a fresh environment:

conda create -n test
conda activate test
conda install --use-local mcm

But the package is not found - maybe logical, because test doesn't know about my other environment. I also tried from my dev-environment with equal outcome

conda install -n test --use-local mcm

The error is always as follows:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - mcm

... [list of channels follows]

Of course, I can install with path to the actual tarball file, but then it excludes dependencies, as described here.

My actual question is how to make this work, but also to (dis-)confirm my nagging feeling that I'm doing it all wrong. I also have been reading a lot on the conda-build docu pages, in particular here.

Or is building conda packages for own projects (not intending to publish beyond working colleagues) overkill, as building pip packages with setuptools seems so much easier? I just got influenced by the statement that installing with pip might break the conda dependencies.

Dr. V
  • 1,747
  • 1
  • 11
  • 14

1 Answers1

0

I found the following issue: https://github.com/conda/conda/issues/7024. This ticket is marked as closed, but I still seem to have that issue with conda 4.8.3.

Well, the work-arounds presented there work for me, e.g.

$ conda install -c file:///home/.../miniconda3/envs/dev-env/conda-bld/ mcm

This is at least a first step.

Now, to share with dear colleagues, I found this one: How can I host my own private conda repository?. Ideally this would be located on a file server, but at work we are now infested with OneDrive. Maybe that will do as well.

Dr. V
  • 1,747
  • 1
  • 11
  • 14