pyspider pkg_resources.DistributionNotFound: wsgidav

发布于 2022-09-06 23:53:31 字数 4571 浏览 26 评论 0

pyspider安装提示成功,运行时出现pkg_resources.DistributionNotFound: wsgidav问题。

[root@localhost ~]# pip install pyspider
Collecting pyspider
  Downloading https://files.pythonhosted.org/packages/df/c3/a045f1814374ef983216f3a5c0023febe0ae8203d40016d14919f6f45411/pyspider-0.3.9.tar.gz (109kB)
    100% |████████████████████████████████| 112kB 80kB/s 
/usr/lib64/python2.7/site-packages/distribute-0.6.13-py2.7.egg/setuptools/command/install_scripts.py:3: UserWarning: Module email was already imported from /usr/lib64/python2.7/email/__init__.pyc, but /usr/lib/python2.7/site-packages is being added to sys.path
  from pkg_resources import Distribution, PathMetadata, ensure_directory
Requirement already satisfied: Flask>=0.10 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: Jinja2>=2.7 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: chardet>=2.2 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: cssselect>=0.9 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: lxml in /usr/lib64/python2.7/site-packages (from pyspider)
Requirement already satisfied: pycurl in /usr/lib64/python2.7/site-packages (from pyspider)
Requirement already satisfied: pyquery in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: requests>=2.2 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: tornado>=3.2 in /usr/lib64/python2.7/site-packages (from pyspider)
Requirement already satisfied: Flask-Login>=0.2.11 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: u-msgpack-python>=1.6 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: click>=3.3 in /usr/lib/python2.7/site-packages/click-6.7-py2.7.egg (from pyspider)
Requirement already satisfied: six>=1.5.0 in /usr/lib/python2.7/site-packages/six-1.11.0-py2.7.egg (from pyspider)
Requirement already satisfied: tblib>=1.3.0 in /usr/lib/python2.7/site-packages (from pyspider)
Requirement already satisfied: wsgidav in /usr/lib64/python2.7/site-packages (from pyspider)
Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python2.7/site-packages (from Flask>=0.10->pyspider)
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/site-packages (from Flask>=0.10->pyspider)
Requirement already satisfied: MarkupSafe in /usr/lib64/python2.7/site-packages (from Jinja2>=2.7->pyspider)
Requirement already satisfied: backports.ssl_match_hostname in /usr/lib/python2.7/site-packages (from tornado>=3.2->pyspider)
Requirement already satisfied: defusedxml in /usr/lib/python2.7/site-packages (from wsgidav->pyspider)
Installing collected packages: pyspider
  Running setup.py install for pyspider ... done
Successfully installed pyspider-0.3.9
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

运行出现问题:

[root@localhost ~]# pyspider
Traceback (most recent call last):
  File "/usr/bin/pyspider", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python2.7/site-packages/distribute-0.6.13-py2.7.egg/pkg_resources.py", line 2671, in <module>
    working_set.require(__requires__)
  File "/usr/lib64/python2.7/site-packages/distribute-0.6.13-py2.7.egg/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python2.7/site-packages/distribute-0.6.13-py2.7.egg/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: wsgidav

发现wsgidav已安装,import wsgidav也没问题。根据https://blog.csdn.net/patrick...

[root@localhost ~]# pip install -U setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/20/d7/04a0b689d3035143e2ff288f4b9ee4bf6ed80585cc121c90bfd85a1a8c2e/setuptools-39.0.1-py2.py3-none-any.whl (569kB)
    100% |████████████████████████████████| 573kB 15kB/s 
Installing collected packages: setuptools
  Found existing installation: setuptools 32.3.0
    Uninstalling setuptools-32.3.0:
      Successfully uninstalled setuptools-32.3.0
Successfully installed setuptools-39.0.1

再运行pyspider还是 pkg_resources.DistributionNotFound: wsgidav

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文