鱼C论坛

 找回密码
 立即注册
查看: 2998|回复: 1

[已解决]matplotlib导入出现错误,求帮忙

[复制链接]
发表于 2016-11-24 19:37:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 天佑吾身 于 2016-11-24 19:38 编辑
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt

numpy和matplotlib导入正常,matplotlib.pyplot导入时候出现错误:

Traceback (most recent call last):

  File "<ipython-input-1-33b161d8c759>", line 3, in <module>
    import matplotlib.pyplot as plt

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 29, in <module>
    import matplotlib.colorbar

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\colorbar.py", line 34, in <module>
    import matplotlib.collections as collections

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\collections.py", line 27, in <module>
    import matplotlib.backend_bases as backend_bases

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 62, in <module>
    import matplotlib.textpath as textpath

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\textpath.py", line 15, in <module>
    import matplotlib.font_manager as font_manager

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 1421, in <module>
    _rebuild()

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 1406, in _rebuild
    fontManager = FontManager()

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 1044, in __init__
    self.ttffiles = findSystemFonts(paths) + findSystemFonts()

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 313, in findSystemFonts
    for f in win32InstalledFonts(fontdir):

  File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 231, in win32InstalledFonts
    direc = os.path.abspath(direc).lower()

  File "C:\Program Files\Anaconda3\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)

ValueError: _getfullpathname: embedded null character

请问这如何是好。
最佳答案
2020-12-16 21:10:00
参考:http://blog.sina.com.cn/s/blog_6681525f0102x2t3.html
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-12-16 21:10:00 | 显示全部楼层    本楼为最佳答案   
参考:http://blog.sina.com.cn/s/blog_6681525f0102x2t3.html
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-17 02:50

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表