fix:readme中配置环境命令,requirements.txt中不应该有Python自带的包#1
Open
Dragonzhoulong wants to merge 3 commits into
Open
Conversation
Author
|
新添加的test.py是最小实现的文件 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

总结
openai,tqdm,pandas,graphvizos,re,argparse,random,subprocess,typing📦 需要用
pip安装的包 (第三方库)这些包不属于 Python 的标准安装,需要您手动安装。它们应该被包含在您的
requirements.txt文件中。openai: 用于与 OpenAI API (如 GPT-4) 交互的官方库。tqdm: 一个非常流行的库,用于在代码中创建智能、可扩展的进度条。pandas: 强大、灵活的数据分析和处理库,主要用于处理表格数据 (DataFrames)。graphviz: 一个用于创建图形可视化(流程图、网络图等)的接口库。pip install graphviz只安装了 Python 的接口包。您还需要在您的操作系统上单独安装 Graphviz 软件本身,否则会报错。brew install graphvizsudo apt-get install graphviz✅ Python 内置模块 (标准库)
这些模块是 Python 的一部分,安装 Python 时就已经自带了。您不应该把它们写入
requirements.txt文件。os: 提供与操作系统交互的功能,如文件路径操作、读写文件等。re: 提供正则表达式匹配操作。argparse: 用于解析命令行参数,让您的脚本可以接受外部输入。random: 用于生成伪随机数。subprocess: 允许您创建和管理子进程,执行外部命令。typing: 支持类型提示 (Type Hints),可以增强代码的可读性和健壮性。正确的
requirements.txt文件根据您的列表,您的
requirements.txt文件应该只包含以下内容: