JoshData/pdf-diff

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

Closed this issue · 2 comments

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/

hi, for windows there isn't anything like pdf-diff we have to install poppler and visual c++ 14.0 requirement, and then it works.

Thanks for the reply. Now I rerun the pip3 command and it works.