Automatically create requirements.txt(自动创建 requirements.txt)
问题描述
有时我从 github 下载 python 源代码,但不知道如何安装所有依赖项.如果没有 requirements.txt 文件,我必须手动创建它.
问题是:
给定 python 源代码目录,是否可以从导入部分自动创建 requirements.txt?
使用 建议使用 Pipenv 或其他工具来改进您的开发流程.
pip3 冻结 >requirements.txt # Python3点冻结>requirements.txt # Python2如果你不使用虚拟环境,pigar 会是你不错的选择.p>
Sometimes I download the python source code from github and don't know how to install all the dependencies. If there is no requirements.txt file I have to create it by hands.
The question is:
Given the python source code directory is it possible to create requirements.txt automatically from the import section?
Use Pipenv or other tools is recommended for improving your development flow.
pip3 freeze > requirements.txt # Python3
pip freeze > requirements.txt # Python2
If you do not use a virtual environment, pigar will be a good choice for you.
这篇关于自动创建 requirements.txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:自动创建 requirements.txt
基础教程推荐
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 包装空间模型 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 求两个直方图的卷积 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
