Pip install fontforge, says Couldnot find a version

不羁岁月 提交于 2021-02-07 14:13:18

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!