AI入坑之路——(1)搭建本地的Python与Jupyter开发环境

搭建本地的Python与Jupyter开发环境

安装PyCharm、MiniConda

PyCharm下载链接
miniconda下载链接

Conda与Pip替换国内源

下面要修改的文件主要有:

shell 复制代码
|---C:\Users\用户名\
	|---.condarc
	|---pip
		|---pip.ini

windows系统下打开C:\Users\用户名\,用户名为自定义或管理员Administrator。

打开.condarc文件(如果没有就新建),设置为阿里云源

txt 复制代码
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

打开C:\Users\用户名\pip\pip.ini文件,如果没有就新建

shell 复制代码
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
timeout = 120

使用conda创建python环境变量

查看当前的环境,默认只有base环境

shell 复制代码
conda env list

创建一个python3.10的环境,并激活

shell 复制代码
conda create --name py310 python=3.10
conda activate py310

在Python环境安装Jupyter

上述conda环境创建好后就有一个python 3.10的环境了,执行pip安装Jupyter的包

shell 复制代码
pip install jupyterlab==4.0.9
pip install ipywidgets==8.1.1

Jupyter 是一款跨语言、交互式的计算环境与文档工具,核心形态是 Jupyter Notebook(笔记本)和 Jupyter Lab(更强大的集成环境),本质是 "让代码、数据、文档、可视化结果融为一体",解决传统代码开发 "孤立、难复现、难展示" 的问题,是数据科学、科研、教学、快速开发的核心工具。

安装完成后使用jupyter-lab命令启动本地jupyter lab环境

shell 复制代码
jupyter-lab .

在PyCharm中使用conda环境

新建工程时配置解释器环境

存量工程可以在setting中重新设置




相关推荐
程序员Better2 分钟前
我终于遇到一台懂 AI 编程的专业编程显示器!
人工智能·openai·编译器
sky_8106134 分钟前
AI Agent 2026编程类客户端调研报告
人工智能·ai
cyl12240716 分钟前
2026年10月嵌入式培训指南:在“AI+嵌入式“爆发前夜,如何选择你的职业跳板?
人工智能·嵌入式硬件
zhikouai9 分钟前
大模型越强,企业 AI 成本越高?3 个治理判断
人工智能
钱栈up11 分钟前
番茄小说榜单爬虫失效排查:从页面路由变更到API参数映射的全流程复盘
python
阳明山水14 分钟前
校准分位数驱动智能库存决策
人工智能·深度学习·算法·机器学习·架构
zhangfeng113320 分钟前
ATK(华为算子测试平台)详细介绍 CANN(Compute Architecture for Neural Networks,神经网络计算架构
人工智能·华为·ai编程·npu·cann
吉安特尔雅21 分钟前
业务级招聘自动化落地实践:桌面端 AI 招聘组件的部署、集成与风险管控要点
人工智能·ai招聘哪家靠谱
老王以为22 分钟前
走进 AI Agent 第四篇(上):知识获取管道——RAG 基础
前端·人工智能·全栈
唐璜Taro22 分钟前
Agent Harness 系列 · 第 1 篇|Agent 不只是换一个更强的模型
人工智能·python