代码拉取完成,页面将自动刷新
1. 安装Anaconda 镜像地址: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ (官网的话太慢了,建议3.x)
在Anaconda中创建了一个环境叫chatgptLearn要在软件中新建,不然没有库)
虚拟环境地址: D:\ProgramData\anaconda3\envs\chatgptLearn
2. Ctrl+Shift+P,在VS Code命令中搜索 Python: Select Interpreter 进入Python解释器选择界面,选中pythonDA。
3.【CTRL+P】 弹出命令面板,输入【>Jupyter】,此时会列出所有 Jupyter 插件支持的操作,选择 【Jupyter: Create New Blank Jupyter Notebook】
运行 Cell(快捷键:【Shift + Enter】)
执行当前 Cell 默认快捷键变为 CTRL + Enter
4. 切换虚拟环境和安装库命令
开始菜单(或者在桌面状态下按 Win 键)找到 Anaconda 3 文件夹,并点击文件夹中的 Anaconda Prompt 程序
conda info --envs # 查看虚拟环境
activate chatgptLearn # 激活 虚拟环境
conda list # 查看当前虚拟环境下的所有安装包
conda install xxx # 来安装 Python 的扩展库
conda uninstall xxx # 卸载包
conda env export > environment.yml # 导出当前虚拟环境
5. 安装库加速
#直接将下面的代码复制到终端
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# 将清华数据源载入
conda config --set show_channel_urls yes
#通过以下指令可以看到已经添加的源
conda config --get channels
6. 安装库
conda install python-dotenv
conda install openai==0.28
conda install ipykernel
conda install langchain
pip install tool
conda install werkzeug
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。