Anaconda 更新 Scrapy 出现的问题
输入:pip install --force --upgrade scrapy
出现以下问题:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
requests 2.19.1 requires idna<2.8,>=2.5, but you'll have idna 2.10 which is incompatible.
jupyterlab-server 1.0.0 requires jsonschema>=3.0.1, but you'll have jsonschema 2.6.0 which is incompatible.
共三个问题,依次解决:
- pip 改变了解决依赖冲突的方式
After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
在命令行后面加上--use-feature=2020-resolver
即:pip install --force --upgrade scrapy --use-feature=2020-resolver
- requests 与 idna 版本不匹配
requests 2.19.1 requires idna<2.8,>=2.5, but you'll have idna 2.10 which is incompatible.
即,requests的版本要求idna的在2.5到2.8之间,此时可以降低idna的版本,或者更新requests版本
pip install --upgrade requests
- jupyterlab-server 与 jsonschema 版本不匹配
jupyterlab-server 1.0.0 requires jsonschema>=3.0.1, but you'll have jsonschema 2.6.0 which is incompatible.
问题同上,解决方法为更新jsonschema
pip install --upgrade jsonschema