anaconda-project icon indicating copy to clipboard operation
anaconda-project copied to clipboard

anaconda-project add-packages on windows 7 not working

Open birdsarah opened this issue 6 years ago • 6 comments

Steps to reproduce.

On windows 7 (not an issue on win8 and win10) With anaconda-project v0.8.0

mkdir test_project
cd test_project
anaconda-project init  # success
anaconda-project add-command --type notebook default notebook.ipynb  # success
anaconda-project add-packages numpy pandas bokeh  # fail

Error message:

missing requirement to run this project: The project needs a Conda environment containing all required packages.
`C:\Users\builder\AnacondaProjects\test_project\envs\default` doesn't look like it contains a Conda environment yet`
`C:\Users\builder\AnacondaProjects\test_project\envs\default` doesn't look like it contains a Conda environment yet`

screen shot 2018-01-17 at 2 17 06 pm

birdsarah avatar Jan 17 '18 20:01 birdsarah

I can't reproduce this with a pre-existing env, such as you would find in the UI.

jsignell avatar Jan 17 '18 20:01 jsignell

I got the same error messages when trying anaconda-project add-packages on Ubuntu. When I explicitly activated the base environment however it worked:

ben@pc:~/Devel/hls_download$ anaconda-project add-packages urllib, rasterio
missing requirement to run this project: The project needs a Conda environment containing all required packages.
  '/home/ben/Repos/hls_download/envs/default' doesn't look like it contains a Conda environment yet.
'/home/ben/Repos/hls_download/envs/default' doesn't look like it contains a Conda environment yet.
ben@pc:~/Repos/hls_download$ source activate base
(base) ben@pc:~/Devel/hls_download$ anaconda-project add-packages urllib, rasterio
Solving environment: ...working... 

Eventually this might help someone.

benmack avatar Nov 28 '18 10:11 benmack

I am facing the same issue but running Windows 10 x64 and trying to reproduce the clustering_app example. Somehow, when I try to run the command anaconda-project add-packages python=3.5 bokeh=0.12.4 numpy=1.12.0 scikit-learn=0.18.1 showed in the documentation, I get the error in the screenshoot. But the stranger thing is the error message says "clustering_app\envs\default" doesnt look like contains conda environment yet. but my conda envs is in \Anaconda3\envs. proj

zenetio avatar Jan 21 '20 02:01 zenetio

those package versions are quite old and you'll likely need to restore the "free" channel to get them.

Try running this and then your add-packages command again.

conda config --set restore_free_channel true

AlbertDeFusco avatar Mar 17 '21 00:03 AlbertDeFusco

I was having the same issue on, and it turned out to be because the underlying conda process was running out of memory before completing the environment creation. Presumably anaconda-project kept going despite conda failing, then later complained that the environment was not complete.

Not sure if this would resolve the other issues here, but for mine, it would be useful if anaconda-project could:

  1. Have a --debug flag or similar which shows exactly which steps are run and which might be failing.
  2. Detect a conda crash and respond with a more appropriate error message.

I am currently getting around this by using mamba:

CONDA_EXE=mamba anaconda-project prepare

mforbes avatar Sep 02 '21 17:09 mforbes

I have also started seeing memory issue with Conda, particularly with conda-forge.

Both are execellent suggestions, thanks!

AlbertDeFusco avatar Sep 02 '21 23:09 AlbertDeFusco