python安装requests及pandas

python安装requests及pandas

一.requests 是什么

一个第三方库,专门用于发送 HTTP 请求,几乎所有需要"联网"或"访问 API"的 Python 程序,底层都在用它。

如果是让 Python 脚本去和本地的 Ollama 服务对话,就必须安装这个专门负责网络通信的工具。

二.pandas是什么

一个第三方库,它是 Python 处理数据(尤其是表格类数据)的行业标准工具。只要涉及到 Excel、CSV、数据库、或者是任何长得像"行与列"的数据,Pandas 都是不二之选。

三.pip临时指定国内镜像源来安装

使用pip安装requests并指定为阿里镜像源(临时用,只对这一次生效)

复制代码
pip install requests -i https://mirrors.aliyun.com/pypi/simple/

四.pip永久配置国内镜像源

复制代码
pip下载永久设置为阿里镜像源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

查看pip的配置,验证是否生效
pip config list

五.pip安装requests及pandas

复制代码
使用pip安装requests
pip install requests

使用pip安装pandas
pip install pandas
  • end
相关推荐
copyer_xyf38 分钟前
Agent 流程编排
后端·python·agent
copyer_xyf1 小时前
Agent RAG
后端·python·agent
copyer_xyf1 小时前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf1 小时前
Agent 记忆管理
后端·python·agent
星云穿梭16 小时前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵17 小时前
用 Pygame 实现 15 puzzle
python·数学·游戏
黄忠1 天前
大模型之LangGraph技术体系
python·llm
hboot1 天前
AI工程师第二课 - 数据处理
人工智能·python·数据分析
用户8356290780512 天前
使用 Python 自动化 PowerPoint 形状布局与格式设置
后端·python
用户8356290780512 天前
用 Python 自动化 PowerPoint 演讲者备注添加
后端·python