TL;DR
Why does matplotlib's config end up inside $HOME when, installed inside virtualenv, should be scoped to the virtualenv's own site-packages?
Working on Tensorflow project, I
- created virtualenv
- activated virtualenv
- then installed packages like Tensorflow, matplotlib, et al. [note: I do not have these packages installed globally]
In debugging matplotlib error, noticed comment about matplotlib from this answer [https://stackoverflow.com/a/21789908]
why is there a folder .matplotlib in my root folder instead of in the virtual environment where I installed it?
Per matplotlib docs [https://matplotlib.org/faq/troubleshooting_faq.html#matplotlib-configuration-and-cache-directory-locations]:
On unix-like systems, this directory is generally located in your HOME directory under the .config/ directory
using this simple script run from inside virtualenv , I confirm directory location on MacOS [10.10.5]
import matplotlib as mpl
print(mpl.get_cachedir())
# output is '$HOME/.matplotlib'
The docs, however, do not answer the question: why, when virtualenv installs should be scoped to the virtualenv's own site-packages, does matplotlib's config end up inside $HOME?