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中重新设置




相关推荐
财经资讯数据_灵砚智能4 小时前
基于全球经济类多源新闻的NLP情感分析与数据可视化(夜间-次晨)2026年6月8日
大数据·人工智能·python·ai·信息可视化·自然语言处理·灵砚智能
“码”力全开4 小时前
打破芯片与协议壁垒:基于 Docker+边缘计算 的企业级 AI 视频管理平台架构解析(附 GB28181/RTSP 统一接入与源码交付方案)
人工智能·docker·边缘计算
morning_judger4 小时前
Agent开发系列(十)-知识库建设(架构总览)
开发语言·人工智能
南知意-4 小时前
MonkeyCode:长亭开源的企业级AI开发平台,GitHub 3.2k Star!
人工智能·ai·开源·github·ai编程·开源项目
数字人小文4 小时前
生产环境 Agent 实战:4个真实踩坑场景
人工智能
ai产品老杨4 小时前
【架构深评】基于 Docker 与 边缘计算,如何打通 GB28181/RTSP 与 X86/ARM 异构算力的企业级 AI 视频流网关?(附源码交付)
人工智能·docker·架构
星幻元宇VR4 小时前
消防教育基地展厅设备【消防知识安全竞赛系统】
人工智能·科技·学习·安全
TigerOne4 小时前
第12章 多Agent协作——从单体到集群
人工智能
ZHW_AI课题组4 小时前
腾讯云驾车路线规划实现 —— 从 API 调用到代码解析的深度实践
人工智能·机器学习·信息可视化
geovindu4 小时前
python:Coroutines Pattern
开发语言·python·设计模式·协程模式