【Conda】Conda虚拟环境配置系统环境变量,Jupter可使用

1.进入虚拟环境路径

复制代码
$ echo $CONDA_PREFIX
$ cd $CONDA_PREFIX

2.创建环境变量文件

复制代码
mkdir -p ./etc/conda/activate.d
mkdir -p ./etc/conda/deactivate.d
touch ./etc/conda/activate.d/env_vars.sh
touch ./etc/conda/deactivate.d/env_vars.sh

3.配置环境变量

将需要的环境变量添加到下面环境中

复制代码
vim ./etc/conda/activate.d/env_vars.sh
vim ./etc/conda/deactivate.d/env_vars.sh

重新激活虚拟环境

复制代码
conda activate 环境

若是jupyter环境,则点击 restart 即可

相关推荐
空堂与归几秒前
大模型再火,也得先过 class 这一关
python
Muselit1 分钟前
Python 泛型:把 list[User] 讲明白
python·fastapi
2501_916007477 分钟前
Python实现HTTPS爬虫的完整指南:使用requests、BeautifulSoup、Selenium和Scrapy
爬虫·python·ios·小程序·https·uni-app·iphone
gptAI_plus15 分钟前
别把整个仓库塞给 AI:用 Python 生成安全的代码上下文清单
python·chatgpt
吃饱了得干活15 分钟前
Agent 记忆系统:从短期记忆到长期记忆
python·langchain·agent
大鱼>32 分钟前
DSPy:LLM程序自动编译与提示词优化
开发语言·人工智能·python·深度学习
2401_8432537037 分钟前
金融智能:AI如何重构银行业未来
人工智能·python·金融
uncle_ll39 分钟前
服务器选型、微调范式、训练优化与环境搭建
服务器·python·gpt·llm·nlp
久久学姐1 小时前
Python开发爬虫的常用技术架构
爬虫·python·http·框架·数据存储
circuitsosk1 小时前
大规模离线数据管道构建:样本获取、清洗、加工与合成
人工智能·python·机器学习·搜索引擎