安装service_identity失败总结
有一天運行一個爬蟲程序時報以下錯誤:
:0: UserWarning: You do not have a working installation of the service_identity module: ‘cannot import name ‘原錯誤中這是一個不能導入某個包,忘了是啥了’’. Please install it from https://pypi.python.org/pypi/service_identity and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
參考:使用Scrapy時遇到:UserWarning: You do not have a working installation of the service_identity module
發生以上錯誤的根本原因原因得看這句話
在service-identity 21.1.0下載了一個文件service_identity-21.1.0-py2.py3-none-any.whl放在 D:\python3\Scripts下
使用
安裝失敗
報錯:
嘗試使用
pip install service_identity-21.1.0-py2.py3-none-any.whl --force --upgrade報錯:
ERROR: Could not install packages due to an OSError: [WinError 5] 拒絕訪問。: 'd :\\python3\\lib\\site-packages\\_cffi_backend.cp36-win_amd64.pyd' Consider using the `--user` option or check the permissions.嘗試使用
pip install --user service_identity-21.1.0-py2.py3-none-any.whl --force --upgrade成功!
Successfully installed attrs-21.2.0 cffi-1.14.6 cryptography-3.4.8 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 service-identity-21.1.0 six-1.16.0總結
以上是生活随笔為你收集整理的安装service_identity失败总结的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深度学习---英文名称简写大全
- 下一篇: pip 命令参数以及如何配置国内镜像源