0

I have a problem like so: I am in a conda environment that has mamba installed (let's call the environment mamba_env). I now want to use mamba to install a (self-built) package some_package into another conda environment called some_env.
The python version in some_env is python3.10 and site packages are stored in ~/.conda/envs/some_env/lib/python3.10/site-packages.

The command I am using is mamba install some_package -n some_env.

However, this command places the installation files for some_package into ~/.conda/envs/some_env/lib/python3.11/site-packages. Hence they are not visible to the python3.10 executable in some_env.

Why does this happen?
python3.11 is the system-wide python executable found in /usr/bin/python3.11.
Can it be related to an error in my build of some_package?
It does not happen when I e.g. do mamba install black -n some_env from inside mamba_env.
The black package is then nicely placed into ~/.conda/envs/some_env/lib/python3.10/site-packages.

Any pointers appreciated!

chriss
  • 53
  • 7
  • Could you share the real name of "some_package"? If you suspect a build error in it, then it would be helpful to know which one you are referring to – FlyingTeller Jul 18 '23 at 09:58
  • 1
    Just to make sure: Have you installed `mamba` into a non-base env? I think that is not supported officially. See https://mamba.readthedocs.io/en/latest/installation.html "Installing mamba into any other environment than base is not supported." – FlyingTeller Jul 18 '23 at 09:58
  • Regarding #1 it is not an official package, but rather some own project that I packaged and currently only use locally. Regarding #2 thanks for this pointer, I have indeed in a spike of imaginary cleverness thought that I could keep mamba in its own mamba_env. So this might be the problem here. I will check whether keeping mamba in base will solve my issue, thanks. – chriss Jul 18 '23 at 10:12
  • So the suggestion #2 was definitely important (thanks @FlyingTeller) as I have been completely unaware regarding this, but did not solve the issue. The issue was that I had build the conda package only against python3.11. I will post an answer to the question. – chriss Jul 18 '23 at 10:49

1 Answers1

0

Problem was that I had built the package only against python3.11. In my meta.yaml I had to replace

build:
  linux-64: python

by

build:
  noarch: python

Resources:
https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#architecture-independent-packages
Create conda package across many versions

chriss
  • 53
  • 7