我目前有一个使用 pip3 生成的需求文件,如下所示:
pip3 freeze > requirements.txt
通过上述命令,我得到了以下 requirements.txt 文件:
alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work
appdirs==1.4.4
argh==0.26.2
argon2-cffi @ file:///C:/ci/argon2-cffi_1613037869401/work
astroid @ file:///C:/ci/astroid_1623162452381/work
async-generator @ file:///home/ktietz/src/ci/async_generator_1611927993394/work
atomicwrites==1.4.0
attrs @ file:///tmp/build/80754af9/attrs_1620827162558/work
autopep8 @ file:///tmp/build/80754af9/autopep8_1615918855173/work
Babel @ file:///tmp/build/80754af9/babel_1620871417480/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
bcrypt @ file:///C:/ci/bcrypt_1607022693089/work
beautifulsoup4==4.9.3
black==19.3b0
鉴于以上情况,我需要做什么才能让它看起来像下面的示例?
appdirs==1.4.4
argh==0.26.2
atomicwrites==1.4.0
beautifulsoup4==4.9.3
black==19.3b0
最佳答案
pip list --format=freeze > requirements.txt
这应该会删除 requirements.txt 中的奇怪路径引用。
https://stackoverflow.com/questions/68118092/
相关文章:
linux - 如何从第二行使用 awk '{print $1*Number}' 或告诉他忽略 Na
android - 使用导航组件为每个 fragment 自定义工具栏
python - 如何在 python 中从 json 获取输入的随机回复
kubernetes - 无法使用 Terraform 为 AKS 集群创建命名空间,报告没有此类主
c++ - 尝试将函数作为参数传递时出现 "no suitable constructor exis
github-actions - 如何获取用户名,负责在 github 操作中触发工作流