6

I have done, apt-get install fontforge on my ubuntu system. When i do import fontforge in my python code, it throws error as, No module named fontforge.

When i do, pip install fontforge, it throws error as,,

 Could not find a version that satisfies the requirement fontforge (from versions: )
No matching distribution found for fontforge

How can i install fontforge's python libs?

2 Answers2

8

You may want to install python3-fontforge.

sudo apt-get install python3-fontforge

After that you should be able to use fontforge in ubuntu's python version 3.

You can verify by doing /usr/bin/python3 -c "import fontforge;print(fontforge)". This should now print the path to the fontforge python module.

Hugo Manrique
  • 40
  • 3
  • 8
cel
  • 30,017
  • 18
  • 97
  • 117
-3

Try installing a specific version

pip install fontforge==1.0

For me , the above command completes without errors. If any errors, upgrade pip using

pip install --upgrade pip

And try again. You may try allow externally hosted files also.

pip install --allow-all-external fontforge
cutteeth
  • 2,148
  • 3
  • 25
  • 45
  • What problems are you trying to solve with these instructions? Have you tried them? It does not work for me. – cel Sep 21 '15 at 06:52