问题
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?
回答1:
You may want to install python-fontforge.
sudo apt-get install python-fontforge
After that you should be able to import fontforge in ubuntu's default python version.
You can verify by doing /usr/bin/python -c "import fontforge;print(fontforge)". This should now print the path to the fontforge python module.
回答2:
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
来源:https://stackoverflow.com/questions/32688726/pip-install-fontforge-says-couldnot-find-a-version