Giter Club home page Giter Club logo

Comments (9)

jalan avatar jalan commented on September 25, 2024 2

@windtalkerlv thanks for the detailed output!

creating build/temp.macosx-10.6-intel-3.6

Are you using macOS 10.6, from roughly 2009? It might be that it doesn't support some C++11 features by default. Maybe

CFLAGS="-std=c++11" pip install --verbose pdftotext

will help. Otherwise, maybe it's time to do some updates?

from pdftotext.

edwardsdl avatar edwardsdl commented on September 25, 2024 1

I got it working by setting MACOSX_DEPLOYMENT_TARGET. I have no idea why it matters - the installation worked great for my coworkers.

@kelvinu @windtalkerlv give this a try: MACOSX_DEPLOYMENT_TARGET=10.13 pip install -r requirements.txt (you might have to use something other than 10.13 of course).

from pdftotext.

jalan avatar jalan commented on September 25, 2024

Can you post the full output, starting from pip install pdftotext and ending where the error occurred? If there wasn't very much output, maybe pip --verbose install pdftotext would be better.

from pdftotext.

windtalkerlv avatar windtalkerlv commented on September 25, 2024

I am experiencing the same issue, so I did the --verbose install. Here is the output

Collecting pdftotext
  1 location(s) to search for versions of pdftotext:
  * https://pypi.python.org/simple/pdftotext/
  Getting page https://pypi.python.org/simple/pdftotext/
  Looking up "https://pypi.python.org/simple/pdftotext/" in the cache
  Returning cached "301 Moved Permanently" response (ignoring date and etag information)
  Looking up "https://pypi.org/simple/pdftotext/" in the cache
  Current age based on date: 800
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  Starting new HTTPS connection (1): pypi.org
  "GET /simple/pdftotext/ HTTP/1.1" 304 0
  Analyzing links from page https://pypi.org/simple/pdftotext/
    Found link https://files.pythonhosted.org/packages/d2/cf/b65a7431b1c0eaa54063823d6f083ecd9a2a879646af3d243eb09bc8d0b6/pdftotext-1.0.0.tar.gz#sha256=dc645669e88f138ca4a3f7d1e32e0974d4f051da5dffbbabad7cad62dba7bfc4 (from https://pypi.org/simple/pdftotext/), version: 1.0.0
    Found link https://files.pythonhosted.org/packages/68/62/588c9a70a6c4acc6ec4fbc3c096a99032920c4965c4b231745bbd6e7d9f9/pdftotext-1.1.0.tar.gz#sha256=11536c3b91ea3fcdf9466109f304b897a4c49d25390c3ab231ec70acf6d5786d (from https://pypi.org/simple/pdftotext/), version: 1.1.0
    Found link https://files.pythonhosted.org/packages/16/e3/3b432ac931a7b360899686312145ddc9d0ce7b5ac610eba43c3920937ced/pdftotext-2.0.0.tar.gz#sha256=65b78d9c8858b1e98d6b89a6c83e6dfcdaf0bde014dca89cfe10ced7dc38fc39 (from https://pypi.org/simple/pdftotext/), version: 2.0.0
    Found link https://files.pythonhosted.org/packages/38/99/f247b4b27276f2789744900931d40e312564198a9412e653f3f1bb17def6/pdftotext-2.0.1.tar.gz#sha256=947359bde2f1d158d685414dcfb604a369f3fcee49012baf717a71816045d8ef (from https://pypi.org/simple/pdftotext/), version: 2.0.1
    Found link https://files.pythonhosted.org/packages/05/7c/67643e2c10e99f1ac27eadfd9a3d4e13b920c2e922906aad87152cdc154d/pdftotext-2.0.2.tar.gz#sha256=0b82a9fd255a3f2bf5c861cf9e3174d3c4223e1e441bb060c611dcb4e65c6cb8 (from https://pypi.org/simple/pdftotext/), version: 2.0.2
    Found link https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50 (from https://pypi.org/simple/pdftotext/), version: 2.1.0
  Using version 2.1.0 (newest of versions: 1.0.0, 1.1.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0)
  Looking up "https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz" in the cache
  Current age based on date: 1697
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 1697
  Using cached https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50 (from https://pypi.org/simple/pdftotext/)
  Running setup.py (path:/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/setup.py) egg_info for package pdftotext
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/pdftotext.egg-info
    writing pip-egg-info/pdftotext.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/pdftotext.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/pdftotext.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
  Source in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext has version 2.1.0, which satisfies requirement pdftotext from https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50
Installing collected packages: pdftotext
  Running setup.py install for pdftotext ...     Running command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-jzol2wpc-record/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_ext
    building 'pdftotext' 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 -DPOPPLER_CPP_AT_LEAST_0_30_0=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pdftotext.cpp -o build/temp.macosx-10.6-intel-3.6/pdftotext.o -Wall
    In file included from pdftotext.cpp:5:
    /usr/local/include/poppler/cpp/poppler-page.h:70:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<text_box_data> m_data;
        ~~~~~^
    /usr/local/include/poppler/cpp/poppler-page.h:70:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<text_box_data> m_data;
        ~~~~~~~~~~~~~~~^
    2 errors generated.
    error: command '/usr/bin/clang' failed with exit status 1
error
Cleaning up...
  Removing source in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-jzol2wpc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/
Exception information:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-jzol2wpc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-p43t__6r/pdftotext/

from pdftotext.

windtalkerlv avatar windtalkerlv commented on September 25, 2024

@jalan thanks for the help! I am using High Sierra 10.13.6, and I tired CFLAGS="-std=c++11" pip install --verbose pdftotext. still same problem. heres the log:

$ CFLAGS="-std=c++11" pip3 install --verbose pdftotext
Collecting pdftotext
  1 location(s) to search for versions of pdftotext:
  * https://pypi.python.org/simple/pdftotext/
  Getting page https://pypi.python.org/simple/pdftotext/
  Looking up "https://pypi.python.org/simple/pdftotext/" in the cache
  Returning cached "301 Moved Permanently" response (ignoring date and etag information)
  Looking up "https://pypi.org/simple/pdftotext/" in the cache
  Current age based on date: 36
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 36
  Analyzing links from page https://pypi.org/simple/pdftotext/
    Found link https://files.pythonhosted.org/packages/d2/cf/b65a7431b1c0eaa54063823d6f083ecd9a2a879646af3d243eb09bc8d0b6/pdftotext-1.0.0.tar.gz#sha256=dc645669e88f138ca4a3f7d1e32e0974d4f051da5dffbbabad7cad62dba7bfc4 (from https://pypi.org/simple/pdftotext/), version: 1.0.0
    Found link https://files.pythonhosted.org/packages/68/62/588c9a70a6c4acc6ec4fbc3c096a99032920c4965c4b231745bbd6e7d9f9/pdftotext-1.1.0.tar.gz#sha256=11536c3b91ea3fcdf9466109f304b897a4c49d25390c3ab231ec70acf6d5786d (from https://pypi.org/simple/pdftotext/), version: 1.1.0
    Found link https://files.pythonhosted.org/packages/16/e3/3b432ac931a7b360899686312145ddc9d0ce7b5ac610eba43c3920937ced/pdftotext-2.0.0.tar.gz#sha256=65b78d9c8858b1e98d6b89a6c83e6dfcdaf0bde014dca89cfe10ced7dc38fc39 (from https://pypi.org/simple/pdftotext/), version: 2.0.0
    Found link https://files.pythonhosted.org/packages/38/99/f247b4b27276f2789744900931d40e312564198a9412e653f3f1bb17def6/pdftotext-2.0.1.tar.gz#sha256=947359bde2f1d158d685414dcfb604a369f3fcee49012baf717a71816045d8ef (from https://pypi.org/simple/pdftotext/), version: 2.0.1
    Found link https://files.pythonhosted.org/packages/05/7c/67643e2c10e99f1ac27eadfd9a3d4e13b920c2e922906aad87152cdc154d/pdftotext-2.0.2.tar.gz#sha256=0b82a9fd255a3f2bf5c861cf9e3174d3c4223e1e441bb060c611dcb4e65c6cb8 (from https://pypi.org/simple/pdftotext/), version: 2.0.2
    Found link https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50 (from https://pypi.org/simple/pdftotext/), version: 2.1.0
  Using version 2.1.0 (newest of versions: 1.0.0, 1.1.0, 2.0.0, 2.0.1, 2.0.2, 2.1.0)
  Looking up "https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz" in the cache
  Current age based on date: 36
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 36
  Using cached https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50 (from https://pypi.org/simple/pdftotext/)
  Running setup.py (path:/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/setup.py) egg_info for package pdftotext
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/pdftotext.egg-info
    writing pip-egg-info/pdftotext.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/pdftotext.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/pdftotext.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/pdftotext.egg-info/SOURCES.txt'
  Source in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext has version 2.1.0, which satisfies requirement pdftotext from https://files.pythonhosted.org/packages/96/41/aa31f4a6809eb0574674d6c0cf6bc0e00aaf0ea53c62db8a2d9af50b7cc6/pdftotext-2.1.0.tar.gz#sha256=b7312302007e19fc784263a321b41682f01a582af84e14200cef53b3f4e69a50
Installing collected packages: pdftotext
  Running setup.py install for pdftotext ...     Running command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-r25jq0_p-record/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_ext
    building 'pdftotext' extension
    creating build
    creating build/temp.macosx-10.6-intel-3.6
    /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++11 -DPOPPLER_CPP_AT_LEAST_0_30_0=1 -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pdftotext.cpp -o build/temp.macosx-10.6-intel-3.6/pdftotext.o -Wall
    In file included from pdftotext.cpp:5:
    /usr/local/include/poppler/cpp/poppler-page.h:70:10: error: no template named 'unique_ptr' in namespace 'std'
        std::unique_ptr<text_box_data> m_data;
        ~~~~~^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
error
Cleaning up...
  Removing source in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-r25jq0_p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/
Exception information:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-r25jq0_p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dr/rb1tqvx53kgcwd66dfrvvks00000gn/T/pip-build-3z_fud3b/pdftotext/
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

from pdftotext.

edwardsdl avatar edwardsdl commented on September 25, 2024

I'm having the same problem. Did you ever find a solution?

from pdftotext.

jalan avatar jalan commented on September 25, 2024

It looks like I'll finally have to download this anaconda stuff and give it a try, see what sort of build environment it creates. I hope to have time for it this weekend.

from pdftotext.

jalan avatar jalan commented on September 25, 2024

Thanks, @edwardsdl, that's a good lead. I'll try to find what minimum setting for MACOSX_DEPLOYMENT_TARGET allows the build to succeed in anaconda and see if I can set that automatically in setup.py.

from pdftotext.

jalan avatar jalan commented on September 25, 2024

I added -mmacosx-version-min=10.9 to the compiler flags on macOS, which gets the C++11 features required. I pushed a new release with this change. Tested it out in anaconda on macOS and it works now.

For anyone curious, anaconda seems to be the oddball here, shipping a python distribution that builds for ancient 10.6 by default. The macOS system python2, python2 from brew, and python3 from brew all build for 10.13. 🤷‍♂️

from pdftotext.

Related Issues (20)

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.