Git Product home page Git Product logo

pdf-diff's Introduction

pdf-diff

Finds differences between two PDF documents:

  1. Compares the text layers of two PDF documents and outputs the bounding boxes of changed text in JSON.
  2. Rasterizes the changed pages in the PDFs to a PNG and draws red outlines around changed text.

Example Image Output

The script is written in Python 3, and it relies on the pdftotext program.

Requirements

libxml2 >= 2.7.0, libxslt >= 1.1.23, poppler

Requirements installation for Ubuntu:

sudo apt-get install python3-lxml poppler-utils

Requirements installation for OS X:

brew install libxml2 libxslt poppler

Installation

From PyPI:

pip install pdf-diff

From source:

sudo python3 setup.py install

Running

Turn two PDFs into one large PNG image showing the differences:

pdf-diff before.pdf after.pdf > comparison_output.png

Maintainer Notes

To deploy:

python3 -m pip install --user --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

pdf-diff's People

Contributors

danisowa avatar dannylessio avatar joshdata avatar liam3851 avatar maciejsszmigiero avatar neiljp avatar palewire avatar reinharddominik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf-diff's Issues

NOOB needs help installing the requirements

Hi Josh! I came across this awesome tool you and team built. I am super eager to try it for my project. Being new to Python, I can't figure out what I'm doing wrong. I have installed Python 3.6. I went through the instructions to ensure I setup 'get-pip.py' correctly. I can't figure out how to run the following command:
pip install pdf-diff
without getting error:
'pip' is not recognized as an internal or external command, operable program or batch file.

image

Any help or guidance will be much appreciated.

File Not Found

I get an error that the .pdf file is not found. Do the .pdf files just need to be within the program directory or is there a different location they should be?

no differences but two completely different pdf.How to solve it?

no word list
no word list
Traceback (most recent call last):
File "/opt/conda/bin/pdf-diff", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.6/site-packages/pdf_diff/command_line.py", line 498, in main
img = render_changes(changes, style, args.result_width)
File "/opt/conda/lib/python3.6/site-packages/pdf_diff/command_line.py", line 193, in render_changes
raise Exception("There are no text differences.")
Exception: There are no text differences.

Windows support

Right now pdf-diff depends on /dev/stdout being valid and so only works on OSX and Linux. I have a workaround written that detects the Windows platform and uses a tempfile for pdftotext output instead of /dev/stdout which we use on Windows machines here with some success.

Is this the right place to submit a PR? I see that pdf-diff3 on pypi has a slightly higher version than master, links to this github repo and is mostly the same code, but lists a different maintainer.

Comparision for large documents

Hi, currently when we do large document comparision, for example, 150 pages and above it is taking lot of time or it does not generate any output, any idea or suggestion about handling that issue?

Import Error:no module named 'pdf_diff'

Hi Josh,
I was doing a project when I found your code, that is very useful, but I encountered some difficulties, can you give me some suggestions? This is the case, under the guidance of your document, I used
sudo setup.py install firstly on ubuntu. But when I typed pdf-diff --help or use pdf-diff before.pdf after.pdf > comparison_output.png , it came to :
image
I am looking forward to your reply!

OSError: cannot write mode RGBA as JPEG

Hello,

Thanks for this tool, I'm trying to process diff on a PDF of 250 pages plus and getting this error. It works with 'png' format but it barely readable and images reader hangs because the file is too large...

Calling

% pdf-diff -f jpeg v1.pdf v2.pdf > diff.jpeg

I Get:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/PIL/JpegImagePlugin.py", line 614, in _save
    rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/pdf-diff", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/pdf_diff/command_line.py", line 499, in main
    img.save(sys.stdout.buffer, args.format.upper())
  File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 2158, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python3.8/site-packages/PIL/JpegImagePlugin.py", line 616, in _save
    raise OSError("cannot write mode %s as JPEG" % im.mode) from e
OSError: cannot write mode RGBA as JPEG

I'm on macOS Catalina.
Thanks for your help :)

No module named pdf_diff

I tried this tool in several ways like:
python3, 2, anaconda dist python3.
All has some issue or the other.
Even I tried manually cloning the repo and taking the necessary .py files in the corresponding path.
Still I haven't reached a point to manually run a single diff.
Even at some situation only once I reached a point where the command line was working without issues. But that time also when 2 similar formatted pdfs were provided as inputs, the output image that was configured in the cmd line, did not get the output.
I don't know what is the issue with the tool.
Im using windows10 64bit.
Kindly let me know how to resolve this.
Initially I was using pdf2text and it had some consistency and data misplacement issues, due to which I tried using this, but this is my current situation.
Kindly help me on this.

Diff for other kinds of changes

Besides text changes in text PDFs, this would be even more helpful if it could produce an image with a visual indication of:

  • Changes to non-text PDFs. Much needed for textual changes to scanned, textless PDFs (like the FISA Court's, and many others).
  • New pages added.
  • Pages removed. (The FISA Court had one of these, they chopped off like 30 pages once.)

Output as PDF annotations instead of images

Hi,

I just found this repo and after testing on a very complex PDF pair, it works quite well. Thanks a lot for making this tool !

I think it would be extremely useful (and maybe not so complex after a quick look at the code) to output a pair of PDFs with changes highlighted as annotations (something like strikeouts for removals, and highlights for additions).

I had a look in the code and I see that changes are saved in a format with basically x-y coordinates in the PDF file, before being transformed into x-y coordinates in the image space for rendering the changes. I think that using directly the PDF coordinates and adding annotations using a lib like PDF Annotate (https://github.com/plangrid/pdf-annotate) could be done.

I think it would be super useful ! I'll have a look if I can spare some time this summer, but if that's already in the pipeline, or if you think you could implement it quickly (because you know well your code structure), feel free to do so before me!

fatal error: Python.h File missing during setup

There seems to be a glitch in the installer of master, 6a74da7
When running sudo python3 setup.py install I get

Processing diff_match_patch_python-1.0.2.tar.gz
Writing /tmp/easy_install-ifsfz1nn/diff_match_patch_python-1.0.2/setup.cfg
Running diff_match_patch_python-1.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ifsfz1nn/diff_match_patch_python-1.0.2/egg-dist-tmp-1dq3j8ko
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
interface.cpp:1:10: fatal error: Python.h: File or directory not found
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I am running an almost virgin Ubuntu 17.10, Kernel Version 4.13.0-37-generic on an x86 and did an sudo apt-get install python3-lxml poppler-utils beforehands.

I'll be looking into that as soon as I got time for it but if you know any releief I'd be glad to hear about it.
Thanks and have a nice weekend!

mark_eol_hyphen: 'NoneType' object has no attribute 'endswith'

Hi there!

I'm trying out the most recent version of your pdf-diff (git cloned it today, 6th April 2018) on Ubuntu 16.04. I compiled it manually with python 3.6.4 from anaconda (Unfortunately he found the package not over pip). lxml and lxslt are installed with conda. The installation log is provided here:

$ python setup.py install
running install
running bdist_egg
running egg_info
writing pdf_diff.egg-info/PKG-INFO
writing dependency_links to pdf_diff.egg-info/dependency_links.txt
writing entry points to pdf_diff.egg-info/entry_points.txt
writing requirements to pdf_diff.egg-info/requires.txt
writing top-level names to pdf_diff.egg-info/top_level.txt
reading manifest file 'pdf_diff.egg-info/SOURCES.txt'
writing manifest file 'pdf_diff.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/pdf_diff
copying build/lib/pdf_diff/__init__.py -> build/bdist.linux-x86_64/egg/pdf_diff
copying build/lib/pdf_diff/command_line.py -> build/bdist.linux-x86_64/egg/pdf_diff
byte-compiling build/bdist.linux-x86_64/egg/pdf_diff/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/pdf_diff/command_line.py to command_line.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying pdf_diff.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/pdf_diff-0.9.0-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pdf_diff-0.9.0-py3.6.egg
creating /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg
Extracting pdf_diff-0.9.0-py3.6.egg to /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages
Adding pdf-diff 0.9.0 to easy-install.pth file
Installing pdf-diff script to /cluster/programs/miniconda/envs/miniconda-36/bin

Installed /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg
Processing dependencies for pdf-diff==0.9.0
Searching for Pillow==5.0.0
Best match: Pillow 5.0.0
Adding Pillow 5.0.0 to easy-install.pth file

Using /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages
Searching for lxml==4.2.1
Best match: lxml 4.2.1
Processing lxml-4.2.1-py3.6-linux-x86_64.egg
lxml 4.2.1 is already the active version in easy-install.pth

Using /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/lxml-4.2.1-py3.6-linux-x86_64.egg
Searching for diff-match-patch-python==1.0.2
Best match: diff-match-patch-python 1.0.2
Processing diff_match_patch_python-1.0.2-py3.6-linux-x86_64.egg
diff-match-patch-python 1.0.2 is already the active version in easy-install.pth

Using /users/share/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/diff_match_patch_python-1.0.2-py3.6-linux-x86_64.egg
Finished processing dependencies for pdf-diff==0.9.0

I recieve the following error message when trying to compare two pdfs created with pdflatex.

$ pdf-diff main2.pdf ../v1/main.pdf > compare.png
Traceback (most recent call last):
  File "/cluster/programs/miniconda/envs/miniconda-36/bin/pdf-diff", line 11, in <module>
    load_entry_point('pdf-diff==0.9.0', 'console_scripts', 'pdf-diff')()
  File "/cluster/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg/pdf_diff/command_line.py", line 496, in main
    changes = compute_changes(args.files[0], args.files[1], top_margin=float(args.top_margin), bottom_margin=float(args.bottom_margin))
  File "/cluster/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg/pdf_diff/command_line.py", line 14, in compute_changes
    docs = [serialize_pdf(0, pdf_fn_1, top_margin, bottom_margin), serialize_pdf(1, pdf_fn_2, top_margin, bottom_margin)]
  File "/cluster/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg/pdf_diff/command_line.py", line 29, in serialize_pdf
    for run in box_generator:
  File "/cluster/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg/pdf_diff/command_line.py", line 107, in mark_eol_hyphens
    mark_eol_hyphen(box)
  File "/cluster/programs/miniconda/envs/miniconda-36/lib/python3.6/site-packages/pdf_diff-0.9.0-py3.6.egg/pdf_diff/command_line.py", line 116, in mark_eol_hyphen
    if box['text'].endswith("-"):
AttributeError: 'NoneType' object has no attribute 'endswith'

I assume I made an error during the installation? Or did I encounter a bug?

FileNotFoundError running diff command

placed my 2 PDFs in the same folder where pdf-diff application files are. When I run following command in C prompt: pdf-diff before.pdf after.pdf > comparison_output.png I receive 'WinError' saying file not found:
image

No matching distribution found for pdf-diff

python 3.6.2
pip 9.0.1

$ pip install pdf-diff
Collecting pdf-diff
  Could not find a version that satisfies the requirement pdf-diff (from versions: )
No matching distribution found for pdf-diff

lxml error

Hello,

I got this error using your pdf-diff.py : any idea ?

$ ../VISA_III/pdf-diff.py ../VISA_III/visa_iii.pdf ../VISA_III/visa_iii_old.pdf > diff_visa_iii_iv.png
Traceback (most recent call last):
File "../VISA_III/pdf-diff.py", line 456, in
changes = compute_changes(left_file, right_file, top_margin=top_margin)
File "../VISA_III/pdf-diff.py", line 9, in compute_changes
docs = [serialize_pdf(0, pdf_fn_1, top_margin), serialize_pdf(1, pdf_fn_2, top_margin)]
File "../VISA_III/pdf-diff.py", line 24, in serialize_pdf
for run in box_generator:
File "../VISA_III/pdf-diff.py", line 84, in mark_eol_hyphens
for next_box in boxes:
File "../VISA_III/pdf-diff.py", line 57, in pdf_to_bboxes
dom = etree.fromstring(xml)
File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:82934)
File "src/lxml/parser.pxi", line 1819, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:124533)
File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:123074)
File "src/lxml/parser.pxi", line 1079, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:117114)
File "src/lxml/parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:110510)
File "src/lxml/parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:112276)
File "src/lxml/parser.pxi", line 613, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:111124)
lxml.etree.XMLSyntaxError: PCDATA invalid Char value 7, line 10432, column 81

AttributeError: 'NoneType' object has no attribute 'strip'

I just get the following error message:

Traceback (most recent call last):
File "/usr/local/bin/pdf-diff", line 11, in
load_entry_point('pdf-diff==0.9.0', 'console_scripts', 'pdf-diff')()
File "/usr/local/lib/python3.5/dist-packages/pdf_diff-0.9.0-py3.5.egg/pdf_diff/command_line.py", line 491, in main
changes = compute_changes(args.files[0], args.files[1], top_margin=float(args.top_margin), bottom_margin=float(args.bottom_margin))
File "/usr/local/lib/python3.5/dist-packages/pdf_diff-0.9.0-py3.5.egg/pdf_diff/command_line.py", line 14, in compute_changes
docs = [serialize_pdf(0, pdf_fn_1, top_margin, bottom_margin), serialize_pdf(1, pdf_fn_2, top_margin, bottom_margin)]
File "/usr/local/lib/python3.5/dist-packages/pdf_diff-0.9.0-py3.5.egg/pdf_diff/command_line.py", line 30, in serialize_pdf
normalized_text = run["text"].strip()
AttributeError: 'NoneType' object has no attribute 'strip'

Low output image resolution

Hi, I find the output diff image is in low resolution, and the words are not that clear on my screen. Is there a way to make the output image in high resolution (or just lossless) ?

fatal error: 'limits' file not found

I tried to build this project on macOS Mojave 10.14.5 18F132 x86_64, Kernel: 18.6.0, but it pops a fatal error like:

Processing dependencies for pdf-diff==0.9.1
Searching for diff_match_patch_python
Reading https://pypi.org/simple/diff_match_patch_python/
Downloading https://files.pythonhosted.org/packages/a3/16/704cc1a8840eac28bd5d269b133adccecab7dc0d8df733ff50605c67ba50/diff_match_patch_python-1.0.2.tar.gz#sha256=5a833417344def272ad7dee7c5d455cf3aaf4fb0ffb58029d73e29512dd3ed48
Best match: diff-match-patch-python 1.0.2
Processing diff_match_patch_python-1.0.2.tar.gz
Writing /tmp/easy_install-khsewntz/diff_match_patch_python-1.0.2/setup.cfg
Running diff_match_patch_python-1.0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-khsewntz/diff_match_patch_python-1.0.2/egg-dist-tmp-jha1diff
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on
      the command line to use the libc++ standard library instead
      [-Wstdlibcxx-not-found]
In file included from interface.cpp:3:
./diff-match-patch-cpp-stl/diff_match_patch.h:26:10: fatal error: 'limits' file
      not found
#include <limits>
         ^~~~~~~~
1 warning and 1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

Has anybody met this problem? Thanks to any suggestion!

changes detected where no changes are present

Hello,
if i have a document where a new box is inserted, e.g. in a table, changes are detected where no changes are present. The last word in the "old" document is marked as changed even if it is not changed.

Currently it is not possible to attach files 👎 I will try it later.

Syntax Warning: Invalid Font Weight

Not sure if this warning is a pdf.js error (since I went with https://github.com/JoshData/pdf-diff#node-version being on OSX) or a pdf-diff error:

➜  pdf-diff git:(master) ✗ python3 pdf-diff.py --changes < changes.json > test.png
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight

The output turned out alright, so I'm not sure what's going on. Thanks!

cannot see json output

as per the readme page, the first output is a JSON with bounding box information. This is then used to render to image output. Is there a way to get the JSON output and not the image output?

command line tool

thinking out loud here, but what if...:

$ pdf-diff old.pdf new.pdf
# shells to `open diff.png`

How should I update it?

What's the best way of updating pdf-diff? Do I download the package and run setup.py again?

(By the way, thank you so much for this. It's incredibly useful)

tag versions

There is no tag in the github repository for version 0.9.0.

generate the random data

I would like to create random values in in the range of (1,3) seconds according to the other column data trend which has range (200,1000). How can i create the data?

AttributeError: module 'diff_match_patch' has no attribute 'diff'

 $ pdf-diff journal.pdf journal_v3.pdf > comparison.png
Traceback (most recent call last):
  File "/usr/local/bin/pdf-diff", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/pdf_diff/command_line.py", line 497, in main
    changes = compute_changes(args.files[0], args.files[1], top_margin=float(args.top_margin), bottom_margin=float(args.bottom_margin))
  File "/usr/local/lib/python3.6/dist-packages/pdf_diff/command_line.py", line 17, in compute_changes
    diff = perform_diff(docs[0][1], docs[1][1])
  File "/usr/local/lib/python3.6/dist-packages/pdf_diff/command_line.py", line 122, in perform_diff
    return diff_match_patch.diff(
AttributeError: module 'diff_match_patch' has no attribute 'diff'

 $ pip3 install diff_match_patch
Requirement already satisfied: diff_match_patch in /usr/local/lib/python3.6/dist-packages (20181111)

I've got the the problem above on a Xubuntu 18.04.3 LTS machine witch python 3.6. pdf-diff version 0.9.1 was installed through pip. I am not sure how to debug it further, or what further information are needed to diagnose the error.

Python 3.6.8 (default, Oct  7 2019, 12:59:55) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import diff_match_patch
>>> dir(diff_match_patch)
['__author__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__packager__', '__path__', '__spec__', '__version__', 'diff_match_patch', 'patch_obj', 'sys']

output pdf

Thank you for the project. Stable and fast. The only problem is, I needed to have pdf, not png. So, I came to this solution.

pdf-diff before.pdf after.pdf | docker run -i dpokidov/imagemagick png:- -crop 294:207 -border 1x% +repage pdf:- > comparison_output.pdf

or without docker

pdf-diff before.pdf after.pdf | convert png:- -crop 294:207 -border 1x% +repage pdf:- > comparison_output.pdf

The rationale for docker is that relative crop is supported only in ImageMagic 7x.

During `pip3 install pdf-diff`, error in "diff-match-patch-python" package.

It erred on the building stage of "diff-match-patch-python" package with pip3 install pdf-diff, even after I installed diff-match-patch-python manually beforehand, it still downloaded the "diff_match_patch_python-1.0.2" and failed meanwhile.

OS: macOS Catalina v10.15.5
PIP3: v18.1

The detailed log is attached as follows; much thanks for your attention.

$ pip3 install pdf-diff
Collecting pdf-diff
  Downloading https://files.pythonhosted.org/packages/d6/68/f212aa12ca9c9b2654b9a42957752b38374f5e61255f6fc8355bf0881b86/pdf_diff-0.9.1-py3-none-any.whl
Requirement already satisfied: pillow in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pdf-diff) (5.1.0)
Requirement already satisfied: lxml in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pdf-diff) (4.2.5)
Collecting diff-match-patch-python (from pdf-diff)
  Downloading https://files.pythonhosted.org/packages/a3/16/704cc1a8840eac28bd5d269b133adccecab7dc0d8df733ff50605c67ba50/diff_match_patch_python-1.0.2.tar.gz
Building wheels for collected packages: diff-match-patch-python
  Running setup.py bdist_wheel for diff-match-patch-python ... error
  Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-install-xwyh0slt/diff-match-patch-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-wheel-obxglhb_ --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building 'diff_match_patch' extension
  creating build
  creating build/temp.macosx-10.6-intel-3.6
  /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c interface.cpp -o build/temp.macosx-10.6-intel-3.6/interface.o
  clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  In file included from interface.cpp:3:
  ./diff-match-patch-cpp-stl/diff_match_patch.h:26:10: fatal error: 'limits' file not found
  #include <limits>
           ^~~~~~~~
  1 error generated.
  error: command '/usr/bin/clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for diff-match-patch-python
  Running setup.py clean for diff-match-patch-python
Failed to build diff-match-patch-python
Installing collected packages: diff-match-patch-python, pdf-diff
  Running setup.py install for diff-match-patch-python ... error
    Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-install-xwyh0slt/diff-match-patch-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-record-y5j9jcs0/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'diff_match_patch' extension
    creating build
    creating build/temp.macosx-10.6-intel-3.6
    /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c interface.cpp -o build/temp.macosx-10.6-intel-3.6/interface.o
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from interface.cpp:3:
    ./diff-match-patch-cpp-stl/diff_match_patch.h:26:10: fatal error: 'limits' file not found
    #include <limits>
             ^~~~~~~~
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1

    ----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-install-xwyh0slt/diff-match-patch-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-record-y5j9jcs0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/7f/wn9m0sz56ps16b1hh_l0q13c0000gn/T/pip-install-xwyh0slt/diff-match-patch-python/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.