conda-minify
conda-minify copied to clipboard
Quick Question: Can't conda-minify be installed and used in non-`base` conda envs?
I installed conda-minify in a "non-base" conda env -- here arbitrarily named "gp". Activated env "gp" and tried to use conda-minify to no avail. Quick question: Can't conda-minify be installed and used in non-base
conda envs?
(gp) $ conda-minify -n gp
/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "/Users/d/opt/anaconda3/envs/gp/bin/conda-minify", line 10, in <module>
sys.exit(main())
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/cli.py", line 97, in main
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/environment.py", line 132, in __init__
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda_minify-0.1.2-py3.8.egg/conda_minify/environment.py", line 137, in _init_from_name
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda/cli/python_api.py", line 118, in run_command
raise e
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda/cli/python_api.py", line 107, in run_command
result = do_call(args, p)
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 91, in do_call
return getattr(module, func_name)(args, parser)
File "/Users/d/opt/anaconda3/envs/gp/lib/python3.10/site-packages/conda/cli/main_list.py", line 106, in execute
raise EnvironmentLocationNotFound(prefix)
conda.exceptions.EnvironmentLocationNotFound: Not a conda environment: /Users/d/opt/anaconda3/envs/gp/envs/gp
This project needs a major update which I haven't had time to do due to life (babies, etc.)
My plan is change how the behavior such that it will read a YAML file instead of pulling from the environment directly. This would bypass environment switching issues altogether.
For your particular error, conda-minify is looking for the gp
environment in /Users/d/opt/anaconda3/envs/gp/envs/
instead of /Users/d/opt/anaconda3/envs/
.
This is due to having Conda also installed in your gp
environment. Can you run from the gp
env:
conda config --show
And post the output?