Hello,
I am trying to build snap (with core22
) with conda plugin (from miniconda py310.22.4.0-0
)
and as example I install numpy via conda.
However it failed because it is not able to find conda.
I tried to fix it using build-environment
but no success.
Has anyone tried to solve this issue? I am grateful for any responses.
Best Sebastian
Here, my example code of snapcraft.yaml
and error output:
name: conda-trying
title: Conda testing
version: 0.0.1
base: core22
grade: stable
confinement: strict
architectures:
- build-on: [amd64]
apps:
trying:
extensions: [gnome]
parts:
trying:
plugin: conda
build-environment:
- PATH: /root/miniconda/bin:$PATH
conda-miniconda-version: "py310_24.4.0-0"
conda-packages:
- numpy
conda-python-version: "3.10"
2024-06-06 14:30:57.125 load state file: /root/parts/trying/state/pull
2024-06-06 14:30:57.131 remove directory /root/parts/trying/build
2024-06-06 14:30:57.132 Executing PosixPath('/root/parts/trying/run/build.sh')
2024-06-06 14:30:57.133 :: + '[' -e /root/miniconda.sh ']'
2024-06-06 14:30:57.133 :: + /root/miniconda.sh -bfp /root/miniconda
2024-06-06 14:30:57.140 :: PREFIX=/root/miniconda
2024-06-06 14:30:57.567 :: Unpacking payload ...
2024-06-06 14:31:12.764 ::
2024-06-06 14:31:12.764 :: Installing base environment...
2024-06-06 14:31:12.764 ::
2024-06-06 14:31:13.496 :: Preparing transaction: ...working... done
2024-06-06 14:31:13.497 :: Executing transaction: ...working... done
2024-06-06 14:31:14.104 :: installation finished.
2024-06-06 14:31:14.104 :: WARNING:
2024-06-06 14:31:14.104 :: You currently have a PYTHONPATH environment variable set. This may cause
2024-06-06 14:31:14.104 :: unexpected behavior when running the Python interpreter in Miniconda3.
2024-06-06 14:31:14.104 :: For best results, please verify that your PYTHONPATH only points to
2024-06-06 14:31:14.104 :: directories of packages that are compatible with the Python interpreter
2024-06-06 14:31:14.104 :: in Miniconda3: /root/miniconda
2024-06-06 14:31:14.104 :: + CONDA_TARGET_PREFIX_OVERRIDE=/snap/trying/current
2024-06-06 14:31:14.104 :: + conda create --prefix /root/parts/trying/install --yes python=3.10 numpy
2024-06-06 14:31:14.133 :: Traceback (most recent call last):
2024-06-06 14:31:14.134 :: File "/root/miniconda/bin/conda", line 12, in <module>
2024-06-06 14:31:14.134 :: from conda.cli import main
2024-06-06 14:31:14.134 :: ModuleNotFoundError: No module named 'conda'
2024-06-06 14:31:14.136 Failed to run the build script for part 'trying'.