问题描述
我最近卸载了本地系统中安装的所有 pip3 pip3 包.
I recently uninstalled all pip3 the pip3 packages installed in my local system.
现在,每当我输入 pip3 freeze
时,都会弹出此警告:
Now, whenever I type pip3 freeze
, this warning pops up:
WARNING: Could not generate requirement for distribution -ertifi 2019.11.28
(/usr/local/lib/python3.7/site-packages): Parse error at "'-ertifi='": Expected W:(abcd...)
我如何摆脱这个警告.
我尝试执行 brew restart python3
因为这会重新安装 python3 和 pip3,但它似乎不起作用.
I tried doing brew reinstall python3
as this would reinstall python3 along with pip3 but it doesn't seem to work.
请帮我解决这个问题.
推荐答案
所以我遇到了同样的错误,但对于不同的包:
So I was getting that same error but for a different package:
警告:无法生成分发要求 -niso8601 8.0.0 (...) venv/lib/python3.6/site-packages):在-niso860"处解析错误:预期W:(abcd...)
原来是我第一个包裹里丢失了一封信!我需要有aniso8601==7.0.0"我确实从具有我需要的相同包的不同 venv 中冻结,复制并粘贴到新项目文件夹中的 requirements.txt 中.新项目中的requirements.txt文件就安装成功了.
It turned out to be a missing letter in my first package! I needed to have "aniso8601==7.0.0" I literally did a freeze from a different venv that had that same package I needed, copied and pasted into the requirements.txt in the new project's folder. The requirements.txt file in the new project then installed successfully.
TL;DR:我的 requirements.txt 文件有一个错字.
TL;DR: My requirements.txt file had a typo.
这篇关于画中画 |警告:无法生成分发要求 -ertifi 2019.11.28的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!