2017-01-12 3 views
0

ich Textract zu installieren versuchen und bin immer Fehlermeldungen> Ich verwende Anaconda so habe ich versucht:Python setup.py egg_info“Fehler mit Fehlercode

pip install -i https://pypi.anaconda.org/pypi/simple textract 

Ich habe folgende Fehlermeldung:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-build-4rh6j3p5\Ebo 

ich auch versucht:

pip install textract 

und bekam den gleichen Fehler

0.123.516.

Zuerst versuchte ich setup_tools zu aktualisieren:

pip install --upgrade setuptools 

aber es sagt, es ist bereits up-to-date

ich auch versucht:

pip install ez_setup 

aber sagt die Anforderung erfüllt ist bereits. Ich dachte nicht, dass dies das Problem wäre, weil ich mit pip andere Pakete installieren kann, nur nicht dieses.

Allerdings, wenn ich versuche zu laufen ez_setup:

python ez_setup.py 

ich diesen Fehler:

TypeError: chown() missing 1 required positional argument: 'numeric_owner' 
PS C:\Users\User\Anaconda3\Lib\site-packages> 

Was ich nicht sicher bin, ist verwandt oder nicht. Ich habe auch versucht:

easy_install textract 

Und habe diesen Fehler:

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> 

Gibt es etwas, was ich versuchen könnte?

Antwort

0

Um zu starten, könnten Sie versuchen, pip check textract ausführen, die Abhängigkeiten für die fraglichen gepackten benötigt überprüfen.

Es sieht also so aus, als würden Sie Windows ausführen, was momentan nicht für TextRact unterstützt wird. See here

Sie benötigen möglicherweise die folgenden Bibliotheken und möglicherweise auch andere.

  1. libxml2 2.6.21 oder später wird durch die .docx Parser benötigt, die lxml über Python-docx verwendet.
  2. libxslt 1.1.15 oder später wird durch den Parser .docx der Benutzer lxml über Python-docx benötigt.
  3. Python-Header-Dateien sind für die Erstellung von Lxml erforderlich.
  4. antiword wird vom Parser .doc benötigt.
  5. pdftotext ist optional von der .pdf Parser erforderlich (es gibt eine reine Python Fallback, die funktioniert, wenn pdftotext nicht installiert ist).
  6. pstotext wird vom Parser .ps benötigt.
  7. tesseract-ocr wird von dem Parser .jpg, .png und .gif benötigt.
  8. sox wird von dem Parser .mp3 und .ogg benötigt.

Sie benötigen ffmpeg, lame, libmad0 und libsox-fmt-mp3 zu installieren, bevor SOx Bau, für diese Dateitypen zu arbeiten.

Verwandte Themen