4

The following message is being displayed whenever I am attempting to update any package with conda update package-name

I have installed Anaconda previously on 16.04 and 16.10 with no such issues.

CondaIOError: IO error: Missing write permissions in: /home/samriddhi/anaconda3
#
# You don't appear to have the necessary permissions to update packages
# into the install area '/home/samriddhi/anaconda3'.
# However you can clone this environment into your home directory and
# then make changes to it.
# This may be done using the command:
#
# $ conda create -n my_root --clone=/home/samriddhi/anaconda3
7
  • 3
    Check permissions with ls -al /home/samriddhi/anaconda3 May 21, 2017 at 18:30
  • . . . or namei -l /home/samriddhi/anaconda3 to see the parent permissions also May 21, 2017 at 18:31
  • > f: /home/samriddhi/anaconda3 > drwxr-xr-x root root / > drwxr-xr-x root root home > drwxr-xr-x samriddhi samriddhi samriddhi > drwxr-xr-x root root anaconda3
    – djokester
    May 21, 2017 at 18:32
  • So there you are that's the problem, root owns it May 21, 2017 at 18:36
  • 2
    Remove that /home/samriddhi/anaconda3, run the installer bash Anaconda3-4.2.0-Linux-x86_64.sh from then on run the conda command without sudo prefix. Please note the .sh installer may not be the latest download the latest May 21, 2017 at 18:50

2 Answers 2

5

Though Djokester's answer should work fine, it seems like terrible overkill to me. One could just do:

sudo chown -R username:username anaconda3

Where username is your users name.

4

This is a very common issue online and I found no solution for it on AskUbuntu or StackOverflow and hence I am posting this answer.

Anaconda comes as a .sh file which is to be installed with the following command

bash Anaconda3-4.3.1-Linux-x86_64.sh

Now even though I have done it before for some reason I added a sudo before this command rendering the anaconda3 folder inaccesible without root permission.

Therefore the conda package management system could not access the directory and hence the issue. If such an issue exists simply delete the previous installation instance with sudo rm -rf anaconda3 and reinstall.

Thanks to George for his valuable comments!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.