当前位置: 首页 > news >正文

python environment settings

Install python

https://www.python.org/

 

for example:

python-3.14.0-amd64.exe

 

install

image

 

 

 

List all python installed in local machine

> py -0
-V:3.14 * Python 3.14 (64-bit)
-V:3.13 Python 3.13 (64-bit)
-V:3.12 Python 3.12 (64-bit)
-V:3.11 Python 3.11 (64-bit)

  

 

Create virtual enviornement for python project

> python --version
Python 3.9.13

 

 

 

> py -m venv myenv_3_14

 

 

> .\myenv_3_14\Scripts\activate
(myenv_3_14) PS D:\

 

(myenv_3_14) PS D:\> python --version
Python 3.14.0
(myenv_3_14)

 

 

> deactivate

  

 Jupyter Notebook

 

 

> py --version
Python 3.14.0

 

> py -m pip install --upgrade pip

 

> py -m pip install notebook




> jupyter notebook [I 2025-11-25 20:46:28.199 ServerApp] Extension package jupyter_server_terminals took 0.6866s to import [I 2025-11-25 20:46:28.706 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-11-25 20:46:28.712 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-11-25 20:46:28.727 ServerApp] jupyterlab | extension was successfully linked. [I 2025-11-25 20:46:28.738 ServerApp] notebook | extension was successfully linked.
...

Or copy and paste one of these URLs:http://localhost:8888/tree?token=a7b0746c1f0cd96588efa4198781436a3d4cf4ff2e7dbdf6http://127.0.0.1:8888/tree?token=a7b0746c1f0cd96588efa4198781436a3d4cf4ff2e7dbdf6

 

image

image

 

 

1. Jupyter Notebook

  • What it is:
    An interactive web-based environment for writing and running code, especially popular in data science and machine learning.
  • Key Features:
    • Runs in your browser.
    • Supports Markdown for documentation alongside code.
    • Allows inline visualization (charts, plots, images).
    • Supports multiple languages via kernels (Python, R, Julia, etc.).
    • Ideal for exploratory programming, data analysis, and sharing notebooks.
  • Use Case:
    Great for data science, machine learning, prototyping, and teaching.

2. Regular Python Notebook / IDE (e.g., VS Code, PyCharm)

  • What it is:
    A traditional development environment for writing Python scripts (.py files).
  • Key Features:
    • Focused on software development rather than interactive exploration.
    • No built-in Markdown or inline visualization (though IDEs can integrate tools).
    • Better for large projects, debugging, and version control.
  • Use Case:
    Ideal for production code, backend development, and complex applications.

Main Differences

FeatureJupyter NotebookPython IDE / Notebook
Interface Web-based Desktop application
File Type .ipynb .py
Documentation Markdown + Code Comments only
Visualization Inline plots/images Separate windows
Best For Data analysis, ML Full-scale development

 

 User VS code Edit .ipynb code

add file test.ipynb

 

image

 

image

 

ipykernel is a key component of the Jupyter ecosystem. Here’s what it is and why it matters:


What is ipykernel?

  • Definition:
    ipykernel is the Python kernel for Jupyter. A kernel is the computational engine that executes the code contained in your Jupyter Notebook cells.
  • It allows Jupyter Notebook (or JupyterLab) to run Python code and communicate with the notebook interface.

How it works

  • When you start a Jupyter Notebook, it launches a kernel in the background.
  • The kernel:
    • Executes Python code.
    • Sends results back to the notebook interface.
    • Handles variables, imports, and state during your session.

Why do you need it?

    • Without ipykernel, Jupyter cannot run Python code.
    • It’s installed automatically with Jupyter, but if you want to add Python to Jupyter from a virtual environment, you need to install ipykernel in that environment.

 

 

PS,

VS code extention used

image

 

http://www.rkmt.cn/news/60739.html

相关文章:

  • 有限元技巧核心原理与学习路径:从一维基础到多维拓展(七步流程)
  • 实用指南:面向高并发场景的舆情处置技术实践——基于字节探索Infoseek的架构拆解
  • sg 多堆的取石子游戏
  • Day48(18)-F:\硕士阶段\Java\课程代码\后端\web-ai-code\web-ai-project02\tlias-web-management
  • 日总结 31
  • 102302114_比山布努尔兰_作业3
  • 第四十八篇
  • Django 用户认证流程详解:从原理到搭建
  • i.MX 6ULL复位管脚
  • [豪の算法奇妙冒险] 代码随想录算法训练营第六天 | 242-有效的字母异位词、349-两个数组的交集、202-快乐数、1-两数之和
  • 棋盘 就是最简单的nim
  • 会不会是遗嘱呢……
  • [模拟赛]拆分(div)
  • 详细介绍:【微服务组件】Springboot结合Dubbo实现RPC调用
  • 怎么理解np.array([10, 20]).reshape(-1, 1)?
  • 深入解析:网络安全等级保护测评高风险判定实施指引(试行)--2020与2025版对比
  • AI学习机值不值?2025年实测最有用的AI学习机品牌推荐!
  • 2025年11月机器人油脂公司推荐榜:精选五家优质供应商对比分析
  • hikivision 考勤机数据提取
  • [python] Python数据类使用指北
  • 深入解析:iOS 26 App 开发阶段性能优化 从多工具协作到数据驱动的实战体系
  • 小程序开发使用vant ui 组件快速开发
  • 课后作业8
  • 2025年11月25日加班
  • 租房买房必看1为什么户型不方正,会让你越住越穷?
  • 实用指南:Stable Diffusion 短视频制作算力需求与优化策略研究
  • 如何高效地学习Java编程?
  • 实用指南:【底层机制】深入浅出地、系统地剖析 Appium 的原理
  • 容错量子电路大幅降低资源开销
  • 详细介绍:【C基本功】类型转换的奇幻漂流