idea搭建Python环境

概述

  • idea搭建Python环境,如何像maven管理依赖一样的,管理python依赖

1、安装插件

2、创建项目

3、创建依赖文件 package.txt

pip-autoremove==0.10.0 pipdeptree==2.2.1

4、设置pip镜像加速

ruby 复制代码
阿里云:https://mirrors.aliyun.com/pypi/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
豆瓣:https://pypi.douban.com/simple/
中国科技大学:https://mirrors.bfsu.edu.cn/pypi/web/simple/

# 将清华大学源地址设为默认
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

5、安装依赖

pip install -r package.txt

6、将依赖记录到 package.txt

pip freeze > package.txt

7、创建test.py

print('Hello, Python')

相关推荐
独泪了无痕1 小时前
MyBatis魔法堂:结果集映射
后端·mybatis
copyer_xyf2 小时前
LangChain 调用 LLM
后端·python·agent
copyer_xyf2 小时前
Prompt 组织管理
后端·python·agent
摇滚侠3 小时前
SpringMVC 入门到实战 文件上传 75-77
java·后端·spring·maven·intellij-idea
fox_lht5 小时前
15.3.改进我们之前的输入、输出项目
开发语言·后端·学习·rust
大鸡腿同学6 小时前
用 AI 肝了一个星期的智能客服助手,看看怎么个事
后端
IT_陈寒6 小时前
Python的os.path.join居然能这么坑?
前端·人工智能·后端
张忠琳6 小时前
【Go 1.26.4】Golang Channel 深度解析
开发语言·后端·golang
Rain5096 小时前
2.1 Nest.js 项目初始化与模块化架构
开发语言·前端·javascript·后端·架构·数据分析·node.js