1

I installed Glumpy following this manual by executing commands in my PyCharm console. Everything installed successfully(versions) and when I tried to do

from glumpy import app

I got the following error

According to error description, freetype library seems to be absent in glumpy\ext folder, but it is present

Do you have any ideas how to solve this?

Rocketman
  • 29
  • 6
  • for a note, I've found this compiled version works https://github.com/rougier/freetype-py/issues/17#issuecomment-346870458 . Also, refer to the issue discussion on how to fix it https://github.com/rougier/freetype-py/issues/17 – TSL_ Jun 11 '19 at 02:32

1 Answers1

1

Glumpy doens't have Freetype preinstalled. The folder you see there is actually an API to bind the original Freetype into the module.

If you open the file "main.py" located in this folder you will see something like this:

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    # ------------------------------------------------------------------- 
    ----------
    #
    #  FreeType high-level python API - Copyright 2011 Nicolas P. Rougier
    #  Distributed under the terms of the new BSD license.
    #
    # ------------------------------------------------------------------- 
    ----------
    '''
    FreeType high-level python API

    This the bindings for the high-level API of FreeType (that must be 
    installed
    somewhere on your system).

    Note:
    C Library will be searched using the ctypes.util.find_library. 
    However, 
    this
    search might fail. In such a case (or for other reasons), you can 
    specify 
    the
    FT_library_filename before importing the freetype library and 
    freetype will 
    use
    the specified one.
    '''

Therefore, as the note says crearly, Glumpy tried to find this packages but failed. So you have to find it manually in this file by adding the path string where your FreeType.dll file is located.

1- Install Freetype with pip. 2- In line 49 add the path to your .dll file. 3- Comment the error handler "raise RuntimeError('Freetype library not found')".

That should fix the problem.

zeta12900
  • 31
  • 3