"在Mac OS X上导入matplotlib时出错"

2024-05-14 23:23:58 发布

您现在位置:Python中文网/ 问答频道 /正文

>>> import matplotlib.pyplot as plt
objc[19151]: Class TKApplication is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (0x107aab188) and /Users/rit/anaconda2/envs/mac_gdal/lib/libtk8.5.dylib (0x1117e0e40). One of the two will be used. Which one is undefined.
objc[19151]: Class TKMenu is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (0x107aab1d8) and /Users/rit/anaconda2/envs/mac_gdal/lib/libtk8.5.dylib (0x1117e2020). One of the two will be used. Which one is undefined.
objc[19151]: Class TKContentView is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (0x107aab228) and /Users/rit/anaconda2/envs/mac_gdal/lib/libtk8.5.dylib (0x1117e28a0). One of the two will be used. Which one is undefined.
objc[19151]: Class TKWindow is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (0x107aab278) and /Users/rit/anaconda2/envs/mac_gdal/lib/libtk8.5.dylib (0x1117e2da0). One of the two will be used. Which one is undefined.

导入matplotlib时如何修复此错误。我在macosx上使用python2.7.12(Sierra)


Tags: andinislibraryframeworkversionssystemusers
1条回答
网友
1楼 · 发布于 2024-05-14 23:23:58

如注释中所述,Python无法决定使用什么版本的tk。你打算用水蟒的环境吗?如果你没有理由使用Python的版本,我会删除它,并使用系统一。在

rm /Users/rit/anaconda2/envs/mac_gdal/lib/libtk8.5.dylib

相关问题 更多 >

    热门问题