本文介绍了matplotlib无法在Windows 10上加载ft2font的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将Anaconda 5.0.1与Python 2.7.14结合使用.当我打开jupyter笔记本并尝试运行以下命令时:
I'm using Anaconda 5.0.1 with Python 2.7.14. When I open a jupyter notebook and try to run the following:
%matplotlib inline
我收到以下错误:
ImportError Traceback (most recent call last)
C:\toolkits.win\anaconda2\envs\dlc\lib\site-packages\matplotlib\font_manager.py in <module>()
56
57 import matplotlib
---> 58 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
59 from matplotlib.compat import subprocess
60 from matplotlib.fontconfig_pattern import (
ImportError: DLL load failed: The specified procedure could not be found.
当我尝试深入研究错误时,问题出在ft2font上:
When I try to drill into the error, the problem is with ft2font:
In [1]: from matplotlib import ft2font
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-a32e7826851f> in <module>()
----> 1 from matplotlib import ft2font
ImportError: DLL load failed: The specified procedure could not be found.
我仔细检查并确保安装了freetype:
I double-checked and made sure freetype is installed:
(dlc) C:\Users\Larry>conda install freetype
Fetching package metadata .............
Solving package specifications: .
# All requested packages already installed.
# packages in environment at C:\toolkits.win\anaconda2\envs\dlc:
#
freetype 2.8 vc9hf582001_0 [vc9]
有什么想法吗?
推荐答案
conda install freetype --force-reinstall
这篇关于matplotlib无法在Windows 10上加载ft2font的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!