I got the same error when I was trying to install a package (flask-classful).
I made the mistake of installing anaconda as root. I changed the ownership of the installed anaconda folder and I could install the package successfully.
Use the command chown
with option -R
to recursively change ownership of the installed anaconda folder like so:
chown -R owner:group /path/to/anaconda
Here owner is your username and group is the group name.