gpt4 book ai didi

python - 导入错误 : cannot import name _unquotepath

转载 作者:行者123 更新时间:2023-12-04 19:15:28 24 4
gpt4 key购买 nike

我正在尝试在我的项目中使用scrapy,经过一些初步的努力,我从 https://doc.scrapy.org/en/latest/intro/tutorial.html 开始

当我使用:
scrapy startproject tutorial
它向我抛出错误:

ubuntu@ip-10-241-62-56:~/Selenim$ scrapy startproject tutorial
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/usr/local/lib/python2.7/dist-packages/scrapy/__init__.py", line 34, in <module>
from scrapy.spiders import Spider
File "/usr/local/lib/python2.7/dist-packages/scrapy/spiders/__init__.py", line 10, in <module>
from scrapy.http import Request
File "/usr/local/lib/python2.7/dist-packages/scrapy/http/__init__.py", line 10, in <module>
from scrapy.http.request import Request
File "/usr/local/lib/python2.7/dist-packages/scrapy/http/request/__init__.py", line 13, in <module>
from scrapy.utils.url import escape_ajax
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/url.py", line 15, in <module>
from w3lib.url import _safe_chars, _unquotepath
ImportError: cannot import name _unquotepath

我该如何解决这个问题?

最佳答案

升级 w3lib(到 1.15.0)为我解决了这个问题。

关于python - 导入错误 : cannot import name _unquotepath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39888903/

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