Need root permissions to update fastai? - what did I do wrong?

Hi all,

I create a fastai instance on google cloud plateform following https://course.fast.ai/start_gcp.html

Ran the notebooks, all good.

The fastai version is 1.0.34. I wanted to upgrade it.
I ran (with user jupyter) many commands like:
conda install -c pytorch -c fastai fastai pytorch

I always get the same error:
RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment.

To get rid of the errors and finally update fastai, I had to run those commands:
sudo /opt/anaconda3/bin/conda update --force conda
sudo /opt/anaconda3/bin/conda install -c fastai fastai -c pytorch

Without sudo it was not working, I had permissions errors.

Did I do something wrong? Seems weird I had to use root privileges to update fastai. Or is it normal bc of gcp? Any feedback would be appreciated :slight_smile:
Thank you in advance,
K.

For info, the full list of unsuccessful commands before update conda --force with root:

conda install -c pytorch -c fastai fastai pytorch
conda update --force conda
conda install -c pytorch -c fastai fastai pytorch
conda install  -c fastai fastai 
conda install  -c fastai fastai -c pytorch
sudo /opt/anaconda3/bin/conda install  -c fastai fastai -c pytorch
sudo /opt/anaconda3/bin/conda install fastai -c fastai -c pytorch -c conda-forge
sudo /opt/anaconda3/bin/conda install -c fastai fastai
conda update conda
conda deactivate
conda update conda
1 Like

I had the same issue! Thanks for the tip - this worked for me.
I faced the same challenge with installing lightgbm too. I followed your ‘force conda’ step with “sudo /opt/anaconda3/bin/conda install -c conda-forge lightgbm” and it worked.

1 Like

Hello I am having a similar issue running try to run the update library from GCP
sudo /opt/anaconda3/bin/conda install -c fastai fastai
and getting a
sudo: /opt/anaconda3/bin/conda: command not found
error. Any idea what I should do?

1 Like

I’m facing the same thing.

@Nival

looks like

conda install -c fastai fastai

worked

conda list = gives fastai version 1.0.61