いつもお世話になっております。
下記サイトのツールを作ろうとしています。
Convert any .pdf file ???? into an audio ???? book with Python - DEV Community ????????????????
ですが、
Pythonにpdftotextをインストールすることができないため進めません。
アドバイスいただければ幸いです。
terminalに以下のコマンドでインストールしようとしています。
terminal
1pip3 install pdftotext --user
sudo を加えてもダメでした。
terminal
1sudo pip3 install pdftotext --user
Xcodeを開いてアップデートしましたがダメでした。
エラーログは下記です。
ErrorLog
1Collecting pdftotext 2 Using cached https://files.pythonhosted.org/packages/6e/f8/40627964f1029365b4ff846c7e8c600b5f540b3d6a5d6eb22e8aef0ba80e/pdftotext-2.1.3.tar.gz 3Building wheels for collected packages: pdftotext 4 Building wheel for pdftotext (setup.py) ... error 5 ERROR: Command errored out with exit status 1: 6 command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/setup.py'"'"'; __file__='"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/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/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-wheel-ymimtj6a --python-tag cp37 7 cwd: /private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/ 8 Complete output (32 lines): 9 running bdist_wheel 10 running build 11 running build_ext 12 building 'pdftotext' extension 13 creating build 14 creating build/temp.macosx-10.15-x86_64-3.7 15 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPOPPLER_CPP_AT_LEAST_0_30_0=1 -I/usr/local/include -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pdftotext.cpp -o build/temp.macosx-10.15-x86_64-3.7/pdftotext.o -Wall -mmacosx-version-min=10.9 16 In file included from pdftotext.cpp:3: 17 In file included from /usr/local/include/poppler/cpp/poppler-document.h:25: 18 /usr/local/include/poppler/cpp/poppler-global.h:53:40: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] 19 noncopyable(const noncopyable &) = delete; 20 ^ 21 /usr/local/include/poppler/cpp/poppler-global.h:54:57: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] 22 const noncopyable& operator=(const noncopyable &) = delete; 23 ^ 24 In file included from pdftotext.cpp:5: 25 /usr/local/include/poppler/cpp/poppler-page.h:39:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions] 26 text_box(text_box&&) noexcept; 27 ^ 28 /usr/local/include/poppler/cpp/poppler-page.h:39:25: error: expected ';' at end of declaration list 29 text_box(text_box&&) noexcept; 30 ^ 31 ; 32 /usr/local/include/poppler/cpp/poppler-page.h:40:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions] 33 text_box& operator=(text_box&&) noexcept; 34 ^ 35 /usr/local/include/poppler/cpp/poppler-page.h:40:36: error: expected ';' at end of declaration list 36 text_box& operator=(text_box&&) noexcept; 37 ^ 38 ; 39 4 warnings and 2 errors generated. 40 error: command 'clang' failed with exit status 1 41 ---------------------------------------- 42 ERROR: Failed building wheel for pdftotext 43 Running setup.py clean for pdftotext 44Failed to build pdftotext 45Installing collected packages: pdftotext 46 Running setup.py install for pdftotext ... error 47 ERROR: Command errored out with exit status 1: 48 command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/setup.py'"'"'; __file__='"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/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 /private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-record-lfo0ucmb/install-record.txt --single-version-externally-managed --compile --user --prefix= 49 cwd: /private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/ 50 Complete output (32 lines): 51 running install 52 running build 53 running build_ext 54 building 'pdftotext' extension 55 creating build 56 creating build/temp.macosx-10.15-x86_64-3.7 57 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DPOPPLER_CPP_AT_LEAST_0_30_0=1 -I/usr/local/include -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pdftotext.cpp -o build/temp.macosx-10.15-x86_64-3.7/pdftotext.o -Wall -mmacosx-version-min=10.9 58 In file included from pdftotext.cpp:3: 59 In file included from /usr/local/include/poppler/cpp/poppler-document.h:25: 60 /usr/local/include/poppler/cpp/poppler-global.h:53:40: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] 61 noncopyable(const noncopyable &) = delete; 62 ^ 63 /usr/local/include/poppler/cpp/poppler-global.h:54:57: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] 64 const noncopyable& operator=(const noncopyable &) = delete; 65 ^ 66 In file included from pdftotext.cpp:5: 67 /usr/local/include/poppler/cpp/poppler-page.h:39:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions] 68 text_box(text_box&&) noexcept; 69 ^ 70 /usr/local/include/poppler/cpp/poppler-page.h:39:25: error: expected ';' at end of declaration list 71 text_box(text_box&&) noexcept; 72 ^ 73 ; 74 /usr/local/include/poppler/cpp/poppler-page.h:40:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions] 75 text_box& operator=(text_box&&) noexcept; 76 ^ 77 /usr/local/include/poppler/cpp/poppler-page.h:40:36: error: expected ';' at end of declaration list 78 text_box& operator=(text_box&&) noexcept; 79 ^ 80 ; 81 4 warnings and 2 errors generated. 82 error: command 'clang' failed with exit status 1 83 ---------------------------------------- 84ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/pdftotext/setup.py'"'"'; __file__='"'"'/private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-install-rc3_y6jn/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 /private/var/folders/ww/d7l2rw_s0jx9l70w7k3pr6080000gn/T/pip-record-lfo0ucmb/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/17 09:07
2020/01/17 10:37
2020/01/19 10:15