Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ft2font can be imported from matplotlib in Anaconda prompt terminal, but it failed in python script from Ecelipse/pydev

I try to run a python 3.7 script in Eclipse/pydev on win 7.

But, I got error:

   import matplotlib.ft2font
   ImportError: DLL load failed: The specified procedure could not be found.

If I run : import matplotlib.ft2font

in Anaconda prompt, it works well. But, if I run it in python script from Ecelipse/pydev, it got this error.

  Ecelipse Version: Neon Release (4.6.0)
            Build id: 20160613-1800

Conda info:

  active environment : base
  active env location : C:\MyProgram\Anaconda3p7
      shell level : 1
    conda version : 4.6.3
    conda-build version : 3.17.6
   python version : 3.7.1.final.0

I cannot find any helpful posts online.

My matplotlib version is 3.0.2

Could anyone help about this ?

thanks

like image 358
user3448011 Avatar asked Dec 07 '25 05:12

user3448011


1 Answers

This https://github.com/ContinuumIO/anaconda-issues/issues/6689 helped me by uninstalling matplotlib from conda and installing it with pip instead.

  1. Open an elevated Anaconda prompt (if you installed Anaconda for all users)
  2. conda uninstall matplotlib
  3. pip install matplotlib
like image 58
Lennart Schedin Avatar answered Dec 08 '25 18:12

Lennart Schedin