Monday, November 15, 2021

[SOLVED] CondaError: No writable package cache directories found in conda-pkgs

Issue

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?


Solution

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).



Answered By - Himanshu Poddar