pyfiglet icon indicating copy to clipboard operation
pyfiglet copied to clipboard

No "pyfiglet.fonts" module found

Open The1TrueJoe opened this issue 3 years ago • 2 comments

I installed pyserial without the pip package manager. I could not get the SSL module to work on my Nvidia Jetson (ubuntu 14), so installing via pip was not an option. Instead, I cloned the repo and installed from the setup script.

This is not an issue when installing via pip on another computer (same python and pip versions).

Here are the commands I used:

git clone https://github.com/pwaller/pyfiglet
cd pyfiglet
sudo python3.7 setup.py install

When I checked out the most recent release tag, it solved the issue. (I deleted the previous version from site-packages)

git clone https://github.com/pwaller/pyfiglet
cd pyfiglet
git checkout d7079e9 # Working version
sudo python3.7 setup.py install

Screen Shot 2022-05-02 at 1 38 33 AM

The1TrueJoe avatar May 02 '22 05:05 The1TrueJoe

The directory pyfiglet/fonts was removed for some reason. Maybe it's related to this issue #89 (Font licensing). The one way to fix it is to create pyfiglet/fonts and put required fonts from pyfiglet/fonts-standard or/and pyfiglet/fonts-contrib to it.

Kraktorist avatar May 25 '22 17:05 Kraktorist

Yeah - I removed it so that we can build a package with all the fonts or just those that have a suitable license. You need to pick which by running make minimal or make full first. As you can see, that creates the required directory and populates it with the contents of one or both of the font dirs.

It's possible that there's a better way to specify that directly with setuptools, but I haven't looked as this project already used the Makefile.

peterbrittain avatar May 26 '22 11:05 peterbrittain

This should be fixed with https://github.com/pwaller/pyfiglet/pull/108

mkinney avatar Apr 07 '23 19:04 mkinney

@stefanor did you encounter this issue during #114 / #115, can anyone comment, does this remain an issue?

pwaller avatar Aug 18 '23 21:08 pwaller

The fix in #108 was definitely wrong. The whole point of the split was to separate cleanly licensed fonts from ones with a less clear license (so that Linux distros can just pick the clean fonts).

People using this codebase must use the makefile to decide which set they build. Looks like 114 still respects that logic.

peterbrittain avatar Aug 18 '23 21:08 peterbrittain

Thanks for commenting @peterbrittain.

Judging from the error it looks like it lay within the pkg_resources logic which was replaced in #114 so I think it should no longer be an issue.

pwaller avatar Aug 18 '23 21:08 pwaller

Revising what I wrote last night: I take it the issue would still be present in some form, since it requires a 'make' invocation.. I guess it might be worth having some logic to load from the other directories if they're there, if someone would like to try and implement a fix.

pwaller avatar Aug 19 '23 15:08 pwaller

It depends what you want to achieve.

The distro builders will still want some way to ensure that they just pick up licensed fonts (while others possibly just want everything), so you still need some way to make two different packages. With the legal requirements, you can't create one package with everything. This isn't really what setup.py is designed to do.

What's prompting the revisiting of this issue?

peterbrittain avatar Aug 19 '23 18:08 peterbrittain

It's that someone git clone'd the repository and finds that the software fails. In my mind, ideally it should work more or less as if you had installed it via a different route.

pwaller avatar Aug 19 '23 18:08 pwaller

So, the question is what do you want to build by default and how do you propose to manage the two different builds....

It would be trivial to default builds to safe fonts by just renaming that directory to "fonts".

peterbrittain avatar Aug 19 '23 19:08 peterbrittain

Hopefully addressed by #122

peterbrittain avatar Aug 28 '23 21:08 peterbrittain

I'm going to close this as assumed fixed by #122, please ping this thread if you hit it again and I'll reopen, or file another issue.

pwaller avatar Sep 01 '23 16:09 pwaller