jbarlow83 / homebrew-ocrmypdf

OCRmyPDF homebrew testing private tap
https://github.com/jbarlow83/OCRmyPDF
MIT License
2 stars 0 forks source link

Error when installing #1

Closed sean-duffy closed 6 years ago

sean-duffy commented 7 years ago

When attempting to install on macOS Sierra with Homebrew I get the following error:

Command "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-ro_lxc2u-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-i22v80wz-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/ocrmypdf/4.5.6/libexec/bin/../include/site/python3.6/Pillow" failed with error code 1 in /private/tmp/pip-ro_lxc2u-build/ Exception information: Traceback (most recent call last): File "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install **kwargs File "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/lib/python3.6/site-packages/pip/req/req_install.py", line 878, in install spinner=spinner, File "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/lib/python3.6/site-packages/pip/utils/__init__.py", line 707, in call_subprocess % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: Command "/usr/local/Cellar/ocrmypdf/4.5.6/libexec/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-ro_lxc2u-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-i22v80wz-record/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Cellar/ocrmypdf/4.5.6/libexec/bin/../include/site/python3.6/Pillow" failed with error code 1 in /private/tmp/pip-ro_lxc2u-build/

jbarlow83 commented 7 years ago

Unfortunately this error message is quite obtuse and I can't reproduce it. I did make a change that I think could have fixed the issue. Please try again and let me know if you get any different results. Thanks!

lingdoc commented 7 years ago

I got this same error. After using brew doctor to check the Homebrew installation, I manually linked all the dependencies installed on the previous run, and updated my XQuartz package, and then updated Homebrew. Then using the Homebrew Tap as per the ocrmypdf install instructions worked fine:

brew tap jbarlow83/ocrmypdf brew install ocrmypdf

I think the problem is when you're using an old version of XQuartz on Mac, which I think requires an older version of Homebrew's cask. Try updating and then see if that fixes the problem.

jbarlow83 commented 7 years ago

@sean-duffy It is also possible XQuartz was not installed at all.

I confirmed that Pillow requires XQuartz to build, and this was not requested in the formula. I updated the homebrew formula just now to request XQuartz. I don't know if this is enough in all cases, but hopefully it helps.

@lingdoc thanks for contributing!

hcjl commented 7 years ago

I receive this error as well.

Do you have any further suggestions what the problem could be? Thank you very much.

ocrmypdf.error.txt

jbarlow83 commented 6 years ago

@hcjl Any luck since? The error message amounts to saying "I tried to execute setup.py in a special environment and it failed". It does not capture the underlying error.

brew install --debug --keep-tmp can be more helpful - sometimes.

jbarlow83 commented 6 years ago

@hcjl On further review it seems the issue occurred while trying to compile and install Pillow into ocrmypdf's virtualenv. See if you can successfully install Pillow on its own using homebrew:

http://braumeister.org/repos/Homebrew/homebrew-science/formula/pillow

hcjl commented 6 years ago

@jbarlow83 Thanks for your reply. Unfortunately pillow was removed from the homebrew-science repo. But I will keep on trying to install it on my mac. On my linux machines it works like a charm. So thanks for your great work.

hcjl commented 6 years ago

@jbarlow83 After update of the homebrew repo this morning the installation worked like a charm. I do not know, what you did but thank you very much!! Great work!