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




相关推荐
那个村的李富贵2 分钟前
昇腾CANN跨行业实战:五大新领域AI落地案例深度解析
人工智能·aigc·cann
集简云-软件连接神器6 分钟前
技术实战:集简云语聚AI实现小红书私信接入AI大模型全流程解析
人工智能·小红书·ai客服
松☆6 分钟前
深入理解CANN:面向AI加速的异构计算架构
人工智能·架构
rainbow7242446 分钟前
无基础学AI的入门核心,从基础工具和理论开始学
人工智能
0思必得010 分钟前
[Web自动化] Selenium处理滚动条
前端·爬虫·python·selenium·自动化
子榆.10 分钟前
CANN 与主流 AI 框架集成:从 PyTorch/TensorFlow 到高效推理的无缝迁移指南
人工智能·pytorch·tensorflow
七月稻草人12 分钟前
CANN生态ops-nn:AIGC的神经网络算子加速内核
人工智能·神经网络·aigc
2501_9248787312 分钟前
数据智能驱动进化:AdAgent 多触点归因与自我学习机制详解
人工智能·逻辑回归·动态规划
芷栀夏14 分钟前
CANN开源实战:基于DrissionPage构建企业级网页自动化与数据采集系统
运维·人工智能·开源·自动化·cann
物联网APP开发从业者14 分钟前
2026年AI智能软硬件开发领域十大权威认证机构深度剖析
人工智能