The environment was created with mamba env create.
Executing python -c "import dvc.api" in this environment fails with an ImportError:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc/api/__init__.py", line 1, in <module>
from .data import ( # noqa, pylint: disable=redefined-builtin
File "/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc/api/data.py", line 7, in <module>
from dvc.repo import Repo
File "/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc/repo/__init__.py", line 13, in <module>
from dvc.ignore import DvcIgnoreFilter
File "/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc/ignore.py", line 11, in <module>
from dvc.fs import AnyFSPath, FileSystem, Schemes, localfs
File "/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc/fs/__init__.py", line 7, in <module>
from dvc_objects.fs import ( # noqa: F401
ImportError: cannot import name 'known_implementations' from 'dvc_objects.fs' (/opt/conda-envs/envs/dvc-api-test/lib/python3.10/site-packages/dvc_objects/fs/__init__.py)
DVC's CLI commands like dvc init fail with similar stack traces.
Solution to issue cannot be found in the documentation.
Issue
I experience difficulties with dvc-2.19 as packaged by conda-forge
The environment definition is:
The environment was created with
mamba env create
.Executing
python -c "import dvc.api"
in this environment fails with anImportError
:DVC's CLI commands like
dvc init
fail with similar stack traces.Changing the environment spec to:
will result in a successful import. So does the pip package installation of dvc 2.19 (and 2.20):
The environment data provided below are for the first (failing) environment spec.
Installed packages
Environment info