当前位置: 首页 > 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.jsqmd.com/news/50857/

相关文章:

  • 2025 年 11 月靶材廠家權威推薦榜:濺射/磁控濺射/旋轉靶材,ITO/半導體/光學鍍膜,陶瓷/金屬/鈦/鋁/銅/鎢/鉬/鉭/矽/合金/稀土靶材精選,工藝精湛與創新應用深度解析
  • 2025 年 11 月高壓清洗服務廠家推薦排行榜,管道/下水道/污水管/市政管道高壓清洗,化糞池/隔油池/污水池專業清洗,家庭/商鋪/小區/工廠高效深度清潔首選!
  • 如何在C++中实现面向对象编程?
  • 一物一码赋能全链路管控,二脉科技互动溯源系统引领行业新生态 !
  • 最简单的畅通工程
  • 高级程序语言设计第七次
  • 有限元技巧核心原理与学习路径:从一维基础到多维拓展(七步流程)
  • 实用指南:面向高并发场景的舆情处置技术实践——基于字节探索Infoseek的架构拆解
  • Day48(18)-F:\硕士阶段\Java\课程代码\后端\web-ai-code\web-ai-project02\tlias-web-management
  • 习题解析之:模拟生成微软序列号
  • 50046_基于微信小程序的电影票预订管理系统
  • Verilog位宽赋值规则
  • 云栖实录|驰骋在数据洪流上:Flink+Hologres驱动零跑科技实时计算的应用与实践 - 指南
  • 重练算法(代码随想录版) day21 - 二叉树part8
  • 第四十八篇
  • 2025年11月最新出炉!南京装修公司推荐首推欧阅恒装 TOP5权威榜单
  • 细微颗粒布满了整个房间 点燃通向毁灭实验的导线
  • 漏洞赏金猎人的深度侦察方法:内容发现进阶指南
  • 完整教程:【2025最全】国内AIPPT工具排行榜
  • i.MX 6ULL复位管脚
  • Django 用户认证流程详解:从原理到搭建
  • 棋盘 就是最简单的nim
  • [豪の算法奇妙冒险] 代码随想录算法训练营第六天 | 242-有效的字母异位词、349-两个数组的交集、202-快乐数、1-两数之和
  • 会不会是遗嘱呢……
  • 关于powershell中的-哈希表-Hashtable-类型-说明-类似于python中的字典
  • 2025 GEO优化公司排名权威榜单解读:浙江四家标杆企业凭何突围?
  • Mac Unity 2018.dmg游戏工具 安装步骤 简单易懂教程(附安装包)
  • [模拟赛]拆分(div)
  • 102302147傅乐宜作业3
  • 实用指南:苍穹外卖 —— 文件上传和菜品的CRUD