[英]python setup.py egg_info" failed with error code
I am trying to install textract and am getting error messages> I'm using Anaconda so I tried: 我正在尝试安装textract并收到错误消息>我正在使用Anaconda所以我试过:
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: 首先,我尝试升级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. 我不认为这会是问题,因为我可以使用pip来安装其他软件包,而不是这个。
However, when I try to run ez_setup: 但是,当我尝试运行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. 首先,您可以尝试运行pip check textract
,它将验证打包所需的任何依赖项。
So it looks like you are running windows, which doesn't seem to be currently supported for textract. 所以看起来你正在运行windows,这似乎目前不支持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. .docx
解析器需要libxml2 2.6.21
或更高版本,它通过python-docx使用lxml。 libxslt 1.1.15
or later is required by the .docx
parser which users lxml via python-docx. 用户lxml通过python-docx的.docx
解析器需要libxslt 1.1.15
或更高版本。 antiword
is required by the .doc
parser. .doc
解析器需要antiword
。 pdftotext
is optionally required by the .pdf
parser (there is a pure python fallback that works if pdftotext
isn't installed). pdftotext
是.pdf
解析器可选的(如果没有安装pdftotext
则有一个纯python回退功能)。 pstotext
is required by the .ps
parser. .ps
解析器需要pstotext
。 tesseract-ocr
is required by the .jpg
, .png
and .gif
parser. .jpg
, .png
和.gif
解析器需要tesseract-ocr
。 sox
is required by the .mp3
and .ogg
parser. .mp3
和.ogg
解析器需要sox
。 You need to install ffmpeg
, lame
, libmad0
and libsox-fmt-mp3
, before building sox, for these filetypes to work. 在构建sox之前,需要安装ffmpeg
, lame
, libmad0
和libsox-fmt-mp3
,以使这些文件类型起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.