rpuntaie / pdfformulas

MIT License
0 stars 0 forks source link

incomplete dependencies #1

Open n811mare opened 8 years ago

n811mare commented 8 years ago

1) after installation, there is no pdfformulas.py in /usr/local/bin

2) /usr/local/bin/pdfformulas crashes when being run with error indicating missing dependency (fitz module). i could not find a suitable module in pipy repository.

Traceback (most recent call last): File "/usr/local/bin/pdfformulas", line 9, in load_entry_point('pdfformulas==0.0.5', 'console_scripts', 'pdfformulas')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point return ep.load() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load entry = import(self.module_name, globals(),globals(), ['name']) File "/Library/Python/2.7/site-packages/pdfformulas/init.py", line 4, in from .pdfformulas import formulas_to_images, main File "/Library/Python/2.7/site-packages/pdfformulas/pdfformulas.py", line 34, in import fitz ImportError: No module named fitz

rpuntaie commented 8 years ago

You can clone it from github, cd to it, then do "python setup.py install" On my machine there was as "/usr/local/bin/pdfformulas" (no .py extension)

The fear you will have to install the dependencies manually. sudo apt-get install swig sudo apt-get install libmupdf-dev sudo apt-get install libz-dev sudo apt-get install libjpeg-dev git clone https//github.com/rk700/PyMuPDF cd PyMuPDF git checkout tags/v1.7 sudo python setup.py install

n811mare commented 8 years ago

thx for the answer!! ^^ but im working on a mac, and prefer the "python -m pip install *****" over the "python setup.py install" installation, since I can get rid of broken packages again, without the necessity of uninstalling the complete python (very very bad experiences from older days ^^). I wonder what the respective packages in home-brew will be ... I noticed, that the missing package I seem to miss, is required for producing the image file. It would be even more useful, if I could get the formula in textform for further processing. Your code seems to be very compact. I'll try to remove the PyMuPDF part from your package for my purposes. But otherwise great job ^^