gpt4 book ai didi

python - 如何删除 requirements.txt 中不需要的路径?

转载 作者:行者123 更新时间:2023-12-05 09:32:21 27 4
gpt4 key购买 nike

我目前有一个使用 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 中的奇怪路径引用。

关于python - 如何删除 requirements.txt 中不需要的路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68118092/

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