Question

Over time, I have seen IPython (and equivalently matplotlib) using two locations for config files:

~/.ipython/profile_default/

~/.config/ipython/profile_default

which is the right one? Do these packages check both?

In case it matters, I am using Anaconda on OS X and on Linux

Was it helpful?

Solution

We (IPython) have kind of gone back and forth on the best location for config on Linux. We used to always use ~/.ipython, but then we switched to ~/.config/ipython, which is the XDG-specified location (more correct, for a given value of correct), while still checking both. In IPython 2, we're switching back to ~/.ipython by default, to make it more consistent across the different platforms we support.

However, I don't think it should have been using ~/.config on a Mac - it should always have been ~/.ipython there.

OTHER TIPS

As far as matplotlib is concerned, on OS X the config file (matplotlibrc) will be looked for first in the current directory, then in ~/.matplotlib, and finally in INSTALL/matplotlib/mpl-data/matplotlibrc, where INSTALL is the Python site-packages directory. With a standard install of Python from python.org, this is /Library/Frameworks/Python.framework/Versions/X.Y/lib/pythonX.Y/site-packages, where X.Y is the version you're using, like 2.7 or 3.3.

I know mine uses

~/.config/ipython/profile_default

but it could be possible that it would check both. This Ipython page says that it puts it in

~/.ipython/profile_default/

so I am guessing it checks both.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top