Condaerror: No Writable Package Cache Directories Found in Conda-Pkgs

When I try to create a virtual environment for my jupyter notebook or install any packages in it or try to update conda.

conda create -n virenv python=3.6

I get an error

CondaError: No writable package cache directories found in
('C:\\ProgramData\\conda-pkgs',)

How do I resolve this?

2 Answers

That was due to some permission error I guess. So I created a dedicated folder in my user directory as a package cache, then added it to the pkgs_dirs configuration option (conda config --add pkgs_dirs dir_name). We may need to manually add the default cache(s) back since I think customizing excludes them (check conda config --show pkgs_dirs before and after).

That might happen if you write no at the end of the anaconda installation, resulting in permission issues and conda enviroment not being activated. as well as you can't create more enviroments.

Solution is :

sudo chmod a+w /home/path/to/.conda

example

sudo chmod a+w /home/yourusername/.conda

Cheers.

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.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest