Full output
```bash
(ap3.8) $ anaconda-project --help
Traceback (most recent call last):
File ".../.conda/envs/ap3.8/bin/anaconda-project", line 33, in
sys.exit(load_entry_point('anaconda-project', 'console_scripts', 'anaconda-project')())
File ".../.conda/envs/ap3.8/bin/anaconda-project", line 25, in importlib_load_entry_point
return next(matches).load()
File ".../.conda/envs/ap3.8/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File ".../.conda/envs/ap3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File ".../anaconda-project/anaconda_project/cli.py", line 13, in
import anaconda_project.internal.cli.main as cli_main
File ".../anaconda-project/anaconda_project/internal/cli/main.py", line 16, in
from anaconda_project.internal.cli.prepare_with_mode import (UI_MODE_TEXT_ASK_QUESTIONS,
File ".../anaconda-project/anaconda_project/internal/cli/prepare_with_mode.py", line 12, in
from anaconda_project import project_ops
File ".../anaconda-project/anaconda_project/project_ops.py", line 20, in
from anaconda_project.project import Project, ALL_COMMAND_TYPES
File ".../anaconda-project/anaconda_project/project.py", line 26, in
from anaconda_project.archiver import _list_relative_paths_for_unignored_project_files
File ".../anaconda-project/anaconda_project/archiver.py", line 23, in
from conda_pack._progress import progressbar
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/conda_pack/__init__.py", line 3, in
from .core import CondaEnv, File, CondaPackException, pack
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/conda_pack/core.py", line 6, in
import pkg_resources
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3243, in
def _initialize_master_working_set():
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
f(*args, **kwargs)
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 568, in _build_master
ws.require(__requires__)
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File ".../.conda/envs/ap3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ruamel_yaml' distribution was not found and is required by anaconda-project
```
```bash
git clone https://github.com/Anaconda-Platform/anaconda-project.git
for py in 3.6 3.7 3.8 3.9; do
env="ap${py}"
conda create -yn "${env}" "python=${py}" pip
conda activate "${env}"
python -m pip install -e anaconda-project
anaconda-project --help
done
```
Changing ruamel_yaml to ruamel.yaml in setup.py fixes this issue for python 3.6 through 3.10. (2.7 complains about from tempfile import TemporaryDirectory in project_ops.py: ImportError: cannot import name TemporaryDirectory)
This started happening to me recently. I wonder if some new version of ruamel_yaml or pip has caused this. I got around it so far by dropping -e, but that's not great
When using an editable install,
pip install -e anaconda-project
, runninganaconda-project
give the error:I don't understand all the details -- removing the following from the
bin/anaconda-project
entrypoint fixes it for example:however, it is probably related to the name on PyPI
ruamel.yaml
notruamel_yaml
.Here is how I found this:
Full output
```bash (ap3.8) $ anaconda-project --help Traceback (most recent call last): File ".../.conda/envs/ap3.8/bin/anaconda-project", line 33, inChanging
ruamel_yaml
toruamel.yaml
insetup.py
fixes this issue for python 3.6 through 3.10. (2.7 complains aboutfrom tempfile import TemporaryDirectory
inproject_ops.py
:ImportError: cannot import name TemporaryDirectory
)