conda-minify icon indicating copy to clipboard operation
conda-minify copied to clipboard

conda.exceptions.EnvironmentLocationNotFound: Not a conda environment

Open Hoeze opened this issue 3 years ago • 3 comments

Hi, I just tried to install this package: conda install conda-minify -c jamespreed

But when I try it out, I run into the following error:

Traceback (most recent call last):
  File "/opt/anaconda/3-2019.10/bin/conda-minify", line 10, in <module>
    sys.exit(main())
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/cli.py", line 97, in main
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/environment.py", line 130, in __init__
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/environment.py", line 145, in _init_from_path
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda/cli/python_api.py", line 122, in run_command
    raise e
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda/cli/python_api.py", line 111, in run_command
    result = do_call(args, p)
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda/cli/conda_argparse.py", line 83, in do_call
    return getattr(module, func_name)(args, parser)
  File "/opt/anaconda/3-2019.10/lib/python3.8/site-packages/conda/cli/main_list.py", line 109, in execute
    raise EnvironmentLocationNotFound(prefix)
conda.exceptions.EnvironmentLocationNotFound: Not a conda environment: /opt/anaconda/3-2019.10/bin

Also, is there a way to get this package into conda-forge?

Hoeze avatar Jan 27 '22 15:01 Hoeze

Never mind, I just found my mistake(s):

  1. Always install conda-minify to the base environment. Otherwise it's not able to resolve the conda environments.
  2. Run it like conda run --name base conda-minify -n <env_of_interest>

Hoeze avatar Jan 27 '22 15:01 Hoeze

Shouldn't this lifesaver tip be included in the package main page usage instructions?

rjalexa avatar Oct 16 '22 08:10 rjalexa

This project is pretty stale as I simply have not had time to dedicate to it. I am sorry for that. The future of the project is to use only environment YAML files https://github.com/jamespreed/conda-minify/issues/13#issuecomment-1611550690

jamespreed avatar Jun 28 '23 14:06 jamespreed