jamespreed / conda-minify

A simple library to create minified or relaxed versions of Conda environment specs for cross-platform sharing.
MIT License
59 stars 2 forks source link

conda.exceptions.EnvironmentLocationNotFound: Not a conda environment #11

Open Hoeze opened 2 years ago

Hoeze commented 2 years ago

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 commented 2 years ago

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>

rjalexa commented 2 years ago

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

jamespreed commented 1 year ago

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