I am trying to install textract and am getting error messages> I'm using Anaconda so I tried:
pip install -i https://pypi.anaconda.org/pypi/simple textract
I got the following error:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-build-4rh6j3p5\Ebo
I also tried:
pip install textract
and got the same error.
First I tried to upgrade setup_tools:
pip install --upgrade setuptools
but it says it's already up-to-date
I also tried:
pip install ez_setup
but is says the requirement is already satisfied. I didn't think this would be the issue because I can use pip to install other packages, just not this one.
However, when I try to run ez_setup:
python ez_setup.py
I get this error:
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
PS C:\Users\User\Anaconda3\Lib\site-packages>
Which I'm not sure is related or not. I also tried:
easy_install textract
And got this error:
Searching for textract
Reading https://pypi.python.org/simple/textract/
Downloading https://pypi.python.org/packages/23/4d/0141a229be5edfc5d41efbf7757c050df9820cdee38eae67c08788269152/textract
-1.5.0.tar.gz#md5=29ac38f836a6e6146962d2d70505ffa5
Best match: textract 1.5.0
Processing textract-1.5.0.tar.gz
Writing C:\Users\User\AppData\Local\Temp\easy_install-sd7jvx24\textract-1.5.0\setup.cfg
Running textract-1.5.0\setup.py -q bdist_egg --dist-dir C:\Users\User\AppData\Local\Temp\easy_install-sd7jvx24\textrac
t-1.5.0\egg-dist-tmp-d1fv4qbg
warning: no previously-included files matching '*.py[co]' found under directory '*'
warning: no previously-included files matching '*~' found under directory '*'
warning: no previously-included files matching '*.orig' found under directory '*'
creating c:\users\User\anaconda3\lib\site-packages\textract-1.5.0-py3.5.egg
Extracting textract-1.5.0-py3.5.egg to c:\users\User\anaconda3\lib\site-packages
Adding textract 1.5.0 to easy-install.pth file
Installing textract script to C:\Users\User\Anaconda3\Scripts
Installed c:\users\User\anaconda3\lib\site-packages\textract-1.5.0-py3.5.egg
Reading https://github.com/mattgwwalker/msg-extractor/zipball/master
Processing dependencies for textract
Searching for SpeechRecognition>=3.1.0
Reading https://pypi.python.org/simple/SpeechRecognition/
Downloading https://pypi.python.org/packages/ce/0f/e14418e1797e3b6326618b3b4d1940734ed55878df64812784a7b6168eb5/SpeechRe
cognition-3.6.0.tar.gz#md5=00c6b126dc3494a71bcf57fb693e5644
Best match: SpeechRecognition 3.6.0
Processing SpeechRecognition-3.6.0.tar.gz
Writing C:\Users\User\AppData\Local\Temp\easy_install-08mttkkw\SpeechRecognition-3.6.0\setup.cfg
Running SpeechRecognition-3.6.0\setup.py -q bdist_egg --dist-dir C:\Users\User\AppData\Local\Temp\easy_install-08mttkk
w\SpeechRecognition-3.6.0\egg-dist-tmp-w2rf0wr0
zip_safe flag not set; analyzing archive contents...
speech_recognition.__pycache__.__init__.cpython-35: module references __file__
creating c:\users\User\anaconda3\lib\site-packages\speechrecognition-3.6.0-py3.5.egg
Extracting speechrecognition-3.6.0-py3.5.egg to c:\users\User\anaconda3\lib\site-packages
Adding speechrecognition 3.6.0 to easy-install.pth file
Installed c:\users\User\anaconda3\lib\site-packages\speechrecognition-3.6.0-py3.5.egg
Searching for EbookLib
Reading https://pypi.python.org/simple/EbookLib/
Downloading https://pypi.python.org/packages/04/30/2cbf65fa9587a1ecc66a78eea91f9189ead8fdadd5e009115bce34529aa6/EbookLib
-0.15.tar.gz#md5=d29882a04477c3854b1af9f6a84dc160
Best match: EbookLib 0.15
Processing EbookLib-0.15.tar.gz
Writing C:\Users\User\AppData\Local\Temp\easy_install-vcyqjzub\EbookLib-0.15\setup.cfg
Running EbookLib-0.15\setup.py -q bdist_egg --dist-dir C:\Users\User\AppData\Local\Temp\easy_install-vcyqjzub\EbookLib
-0.15\egg-dist-tmp-ybq3stsw
Traceback (most recent call last):
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 157, in sav
e_modules
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 198, in set
up_context
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 255, in run
_setup
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 285, in run
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 253, in run
ner
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 47, in _exe
cfile
File "C:\Users\User\AppData\Local\Temp\easy_install-vcyqjzub\EbookLib-0.15\setup.py", line 13, in <module>
File "C:\Users\User\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 1671: character maps to <undefined>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\Anaconda3\Scripts\easy_install-script.py", line 11, in <module>
load_entry_point('setuptools==32.3.1', 'console_scripts', 'easy_install')()
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 2270, in main
File "C:\Users\User\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\User\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\User\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 411, in run
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 674, in easy_install
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 702, in install_item
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 747, in process_distribution
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\pkg_resources\__init__.py", line 846, in
resolve
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\pkg_resources\__init__.py", line 1118, i
n best_match
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\pkg_resources\__init__.py", line 1130, i
n obtain
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 674, in easy_install
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 700, in install_item
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 881, in install_eggs
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 1120, in build_and_install
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\command\easy_install.py", lin
e 1106, in run_setup
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 258, in run
_setup
File "C:\Users\User\Anaconda3\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 198, in set
up_context
File "C:\Users\User\Anaconda3\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 169, in sav
e_modules
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 144, in res
ume
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\pkg_resources\_vendor\six.py", line 685,
in reraise
raise value.with_traceback(tb)
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 157, in sav
e_modules
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 198, in set
up_context
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 255, in run
_setup
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 285, in run
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 253, in run
ner
File "C:\Users\User\Anaconda3\lib\site-packages\setuptools-32.3.1-py3.5.egg\setuptools\sandbox.py", line 47, in _exe
cfile
File "C:\Users\User\AppData\Local\Temp\easy_install-vcyqjzub\EbookLib-0.15\setup.py", line 13, in <module>
File "C:\Users\User\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 1671: character maps to <undefined>
Is there anything else I could try?
To start you could try running pip check textract
which will verify any dependencies needed for the packed in question.
So it looks like you are running windows, which doesn't seem to be currently supported for textract. See here
You may need the following libraries, and maybe others as well.
libxml2 2.6.21
or later is required by the .docx
parser which uses lxml via python-docx. libxslt 1.1.15
or later is required by the .docx
parser which users lxml via python-docx. antiword
is required by the .doc
parser. pdftotext
is optionally required by the .pdf
parser (there is a pure python fallback that works if pdftotext
isn't installed). pstotext
is required by the .ps
parser. tesseract-ocr
is required by the .jpg
, .png
and .gif
parser. sox
is required by the .mp3
and .ogg
parser. You need to install ffmpeg
, lame
, libmad0
and libsox-fmt-mp3
, before building sox, for these filetypes to work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.