wig*_*ing 7 python matplotlib ipython python-3.x conda
我在这里使用Miniconda在macOS 10.14上安装了Python 3.7 .我的工作流程使用iPython来运行使用Matplotlib生成绘图的脚本.在我的iPython配置文件中ipython_config.py,我有以下设置来正确渲染Mac上的图形窗口:
c.InteractiveShellApp.gui = 'osx'
c.InteractiveShellApp.matplotlib = 'osx'
Run Code Online (Sandbox Code Playgroud)
当我在终端中运行iPython时,会出现以下错误:
ImportError:Python未作为框架安装.如果未将Python安装为框架,则Mac OS X后端将无法正常运行.有关在Mac OS X上安装Python作为框架的更多信息,请参阅Python文档.请重新安装Python作为框架,或尝试其他后端之一.如果您正在使用(Ana)Conda,请安装python.app并将'python'替换为'pythonw'.有关详细信息,请参阅Matplotlib FAQ中的"在OSX上使用Matplotlib".
使用Matplotlib 2.2.3时,我没有收到此错误.
Matplotlib 3.0 文档指出pythonw在使用Conda和Matplotlib时需要使用Python的框架构建(称为).我安装了这个conda install python.app.然后文档说要使用pythonw而不是python.但是我怎么告诉iPython使用pythonw?
小智 4
打字
echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc
Run Code Online (Sandbox Code Playgroud)
在终端中为我修复了 IPython。
| 归档时间: |
|
| 查看次数: |
1387 次 |
| 最近记录: |