I'm trying to build a conda package on a Mac M2.
Inside the package folder (containing the __init__.py
and meta.yaml
) I run:
>> conda build .
I get
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/conda_interface.py", line 14, in try_exports
return getattr(import_module('conda.exports'), attr)
AttributeError: module 'conda.exports' has no attribute 'get_prefix'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/bin/conda-build", line 7, in <module>
from conda_build.cli.main_build import main
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 18, in <module>
import conda_build.api as api
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/api.py", line 22, in <module>
from conda_build.config import (Config, get_or_merge_config, get_channel_urls,
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/config.py", line 15, in <module>
from .conda_interface import root_dir, root_writable
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/conda_interface.py", line 119, in <module>
context_get_prefix = try_exports("conda.base.context", "get_prefix")
File "/opt/anaconda3/lib/python3.9/site-packages/conda_build/conda_interface.py", line 16, in try_exports
return getattr(import_module(module), attr)
AttributeError: module 'conda.base.context' has no attribute 'get_prefix'
Both conda
and conda-build
are updated. Any idea?