gpt4 book ai didi

Python包(报纸)安装报错

转载 作者:太空宇宙 更新时间:2023-11-04 03:18:28 25 4
gpt4 key购买 nike

尝试安装包失败并出现以下错误。我用谷歌搜索并安装了 setuptools - 仍然遇到同样的错误。

命令:pip install newspaper

Collecting nltk==2.0.5 (from newspaper)
Using cached nltk-2.0.5.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Extracting in C:\Users\pratik\AppData\Local\Temp\tmp0mun48pu
Traceback (most recent call last):
File "c:\users\pratik\appdata\local\temp\pip-build-6gyje7fp\nltk\distribute_setup.py", line 143, in use_setuptools
raise ImportError
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pratik\AppData\Local\Temp\pip-build-6gyje7fp\nltk\setup.py", line 23, in <module>
distribute_setup.use_setuptools()
File "c:\users\pratik\appdata\local\temp\pip-build-6gyje7fp\nltk\distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "c:\users\pratik\appdata\local\temp\pip-build-6gyje7fp\nltk\distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "c:\users\pratik\appdata\local\temp\pip-build-6gyje7fp\nltk\distribute_setup.py", line 99, in _build_egg
_extractall(tar)
File "c:\users\pratik\appdata\local\temp\pip-build-6gyje7fp\nltk\distribute_setup.py", line 467, in _extractall
self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\pratik\AppData\Local\Temp\pip-build-6gyje7fp\nltk

最佳答案

如果您尝试使用 python3 安装,请运行pip3 安装 newspaper3k

如果您正在尝试为 python2 安装并希望首先运行报纸

pip install --upgrade setuptools

然后

pip安装报纸

关于Python包(报纸)安装报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35469917/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com