【问题标题】:os x python script not reading /Users/myname/.matplotlib/matplotlibrcos x python 脚本未读取 /Users/myname/.matplotlib/matplotlibrc
【发布时间】:2014-05-17 10:19:16
【问题描述】:

在终端中运行下面的脚本指向

import matplotlib
print(matplotlib.matplotlib_fname())

/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc

但在 TextMate 中运行它我得到了

/Users/myname/.matplotlib/matplotlibrc

是什么控制了使用哪个 matplotlibrc 以及如何控制它?

我使用 brew 安装了 python-2.7。

【问题讨论】:

    标签: python matplotlib


    【解决方案1】:

    我找到了答案。我需要放

    export MPLCONFIGDIR=$HOME/.matplotlib
    

    可以通过运行 ~/.profile 读取的位置(例如在 ~/.profile 中)。

    不知道为什么没有自动找到。

    【讨论】:

      猜你喜欢
      • 2017-01-09
      • 2013-05-06
      • 1970-01-01
      • 1970-01-01
      • 2019-06-25
      • 2023-03-24
      • 1970-01-01
      • 2014-06-23
      • 1970-01-01
      相关资源
      最近更新 更多