Memo: Lang - Python | Dev Environments

Table of contents

Env Manager

Anaconda3

官方文档

  1. 官网下载安装包

  2. 赋予执行权限,然后执行脚本

    1
    2
    
    chomd +x Anaconda3-2020.11-Linux-x86_64.sh
    bash Anaconda3-2020.11-Linux-x86_64.sh
    
  3. 指定安装位置

    默认是:/home/jack/anaconda3 我指定到了/home/jack/Programs/anaconda3

  4. 安装完成后会询问是否要运行conda init,输入yes。 这会将命令行工具添加到系统的PATH环境变量中。默认每次启动shell会进入(base)环境,如果不想默认进入环境,设置:

    1
    
    conda config --set auto_activate_base false
    
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    
    Preparing transaction: done
    Executing transaction: done
    installation finished.
    Do you wish the installer to initialize Anaconda3
    by running conda init? [yes|no]
    [no] >>> yes
    no change     /home/jack/Programs/anaconda3/condabin/conda
    no change     /home/jack/Programs/anaconda3/bin/conda
    no change     /home/jack/Programs/anaconda3/bin/conda-env
    no change     /home/jack/Programs/anaconda3/bin/activate
    no change     /home/jack/Programs/anaconda3/bin/deactivate
    no change     /home/jack/Programs/anaconda3/etc/profile.d/conda.sh
    no change     /home/jack/Programs/anaconda3/etc/fish/conf.d/conda.fish
    no change     /home/jack/Programs/anaconda3/shell/condabin/Conda.psm1
    no change     /home/jack/Programs/anaconda3/shell/condabin/conda-hook.ps1
    no change     /home/jack/Programs/anaconda3/lib/python3.8/site-packages/xontrib/conda.xsh
    no change     /home/jack/Programs/anaconda3/etc/profile.d/conda.csh
    modified      /home/jack/.bashrc
    
    ==> For changes to take effect, close and re-open your current shell. <==
    
    If you'd prefer that conda's base environment not be activated on startup,
       set the auto_activate_base parameter to false:
    
    conda config --set auto_activate_base false
    
    Thank you for installing Anaconda3!
    
    ===========================================================================
    
    Working with Python and Jupyter notebooks is a breeze with PyCharm Pro,
    designed to be used with Anaconda. Download now and have the best data
    tools at your fingertips.
    
    PyCharm Pro for Anaconda is available at: https://www.anaconda.com/pycharm
    

  1. 卸载 Anaconda

    1
    
    rm -rf ~/anaconda3 ~/.condarc ~/.conda ~/continum
    

    打开~/.bashrc , 并且从环境变量中移除 Anaconda 内容


  1. 打开 jupyter notebook

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    
    #进入环境
    jupyter notebook &
    # 然后浏览器显示说:`Access to the file was denied`
    (base) jack@ThinkPad:~/Downloads$ jupyter notebook &
    [2] 39989
    (base) jack@ThinkPad:~/Downloads$ [I 21:59:09.058 NotebookApp] The port 8888 is already in use, trying another port.
    [I 21:59:09.058 NotebookApp] The port 8889 is already in use, trying another port.
    [I 21:59:09.058 NotebookApp] The port 8890 is already in use, trying another port.
    [I 21:59:09.125 NotebookApp] JupyterLab extension loaded from /home/jack/Programs/anaconda3/lib/python3.8/site-packages/jupyterlab
    [I 21:59:09.125 NotebookApp] JupyterLab application directory is /home/jack/Programs/anaconda3/share/jupyter/lab
    [I 21:59:09.128 NotebookApp] Serving notebooks from local directory: /home/jack/Downloads
    [I 21:59:09.128 NotebookApp] Jupyter Notebook 6.1.4 is running at:
    [I 21:59:09.128 NotebookApp] http://localhost:8891/?token=a431e81cb5226516384a834ccda51fa12ed131
    [I 21:59:09.128 NotebookApp]  or http://127.0.0.1:8891/?token=a431e81cb5226516384a834ccda51fa12ed131
    [I 21:59:09.128 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
    [C 21:59:09.173 NotebookApp]
    
        To access the notebook, open this file in a browser:
            file:///home/jack/.local/share/jupyter/runtime/nbserver-39989-open.html
        Or copy and paste one of these URLs:
            http://localhost:8891/?token=a431e81cb5226516384a834ccda51fa12ed131
         or http://127.0.0.1:8891/?token=a431e81cb5226516384a834ccda51fa12ed131
    

    然后我复制粘贴了其中一个链接就进去了

    1
    
    [I 21:59:48.623 NotebookApp] 302 GET /?token=a431e81cb5226516384a834ccda51fa12ed131 (127.0.0.1) 0.91ms
    

  1. 查看conda版本: conda --version

  2. 更新conda: conda update conda

  3. 查看condas帮助: conda --help

  • The packages will take massive disk space, so a solution is specifying another location instead of /home/z/anaconda3. Tips

    (2024-04-04)

    1
    2
    3
    
    conda config --add pkgs_dirs <Drive>/<pkg_path>
    conda env create --file environment.yml --prefix <Drive>/<env_path>/gaussian_splatting
    conda activate <Drive>/<env_path>/gaussian_splatting
    

  1. 新建虚拟环境 Docs

    1
    
    conda create --name <env_name> <package_names>
    
    • (2024-05-15) 环境名(和Git仓库名)还是小写,(之前想起过,但是忘了,好像是)因为敲命令时,大写字母不好打,还得多按 Capslock。
    • <env_name> 即创建的环境名。建议以英文命名,且不加空格,名称两边不加尖括号<>

    • <package_names> 即安装在环境中的包名。名称两边不加尖括号<>。 如果要安装指定的版本号,则只需要在包名后面以=和版本号的形式执行。如:

      1
      
      conda create --name python2 python=2.7
      

      即创建一个名为“python2”的环境,环境中安装版本为2.7的python。

    • 如果要在新创建的环境中创建多个包,则直接在 <package_names> 后以空格隔开,添加多个包名即可。如:

      1
      
      conda create -n conda-test python=3.6 numpy pandas
      

      即创建一个名为“conda-test ”的环境,环境中安装版本为3.6的python,同时也安装了numpy和pandas。–name同样可以替换为-n。

    从配置文件创建环境:

    1
    
    conda env create -f environment.yml
    

  1. 切换conda环境

    1
    
    conda activate env_name
    
  2. 退出虚拟环境

    1
    
    conda deactivate
    
  3. 显示安装过的所有虚拟环境

    1
    2
    3
    
    conda info --envs
    conda info -e
    conda env list
    
  4. 复制环境

    1
    
    conda create --name new_env_name --clone copied_env_name
    
  5. 删除环境

    1
    
    conda remove --name env_name --all
    

  1. 包管理

    1
    2
    3
    4
    5
    6
    7
    8
    
    conda search --full-name 查找的包名	#精确查找包
    condas search 查找的内容	#模糊查找包
    conda list				#获取当前环境中已安装的包信息
    
    conda install 要安装的包名	#在当前环境中安装包
    conda install --name 环境名 待安装的包名	#指定环境安装包
    conda install --name test_env django=2.0.6	#指定在test-env环境中安装django,并指定版本为2.0.6
    pip install 包名	#conda安装不上的包,可用pip安装
    

  1. 安装opencv库

    1
    
    pip install opencv-python
    

    但是不能显示图片:

    1
    
    cv2.imshow("Input", img)
    

    会报错:

    1
    2
    
    QObject::moveToThread: Current thread (0x5618bc769b70) is not the object's thread (0x5618bd757380).
    Cannot move to target thread (0x5618bc769b70)
    

    不安装binary (PypiDoc SOF回答)

    1
    
    pip install --no-binary opencv-python opencv-python
    

    然后,还要再加两句,才能正常显示:

    1
    2
    
    cv2.waitKey(0)
    cv2.destroyAllWindows()
    

  1. Lambda Server:

    在服务器上安装完conda 之后,也把路径~/anaconda3/bin添加到了环境变量.profile,但是无法执行命令:conda activate myenv,报错:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    
    CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    To initialize your shell, run
    
        $ conda init <SHELL_NAME>
    Currently supported shells are:
      - bash
      - fish
      - tcsh
      - xonsh
      - zsh
      - powershell
    
    See 'conda init --help' for more information and options.
    
    IMPORTANT: You may need to close and restart your shell after running 'conda init'.
    

    并且通过SSH也无法自动补全(Why do some ssh sessions offer autocomplete and some not?

    1. 原来是我每次登录,bash都没有启动。我要手动启动。

    2. (2023-10-17) 在 script 中使用 conda 也会遇到这个问题,可以在 script 中执行 conda activate 之前刷新 conda:

      1
      2
      
      source $HOME/anaconda3/etc/profile.d/conda.sh
      conda activate nerf
      

      Python - Activate conda env through shell script


  1. environment.yml

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    
    # run: conda env create -f environment.yml
    name: AIM
    channels:
      - pytorch
      - conda-forge
    dependencies:
      - python==3.7.13
      - pytorch==1.10.0
      - torchvision==0.11.0
      - cudatoolkit=11.3
      - pip
      - pip:
        - timm==0.5.4
    

    Note that if set cudatoolkit==11.3, the environment cannot be solved: ResolvePackageNotFound: - cudatoolkit==11.3


  1. Run Jupyter notebook on server: jupyter notebook --no-browser --port=1234, and forward 1234 to local’s 1234 via: ssh -L 1234:localhost:1234 zichen@serveripxxx


  1. 导出环境, export a Conda environment and list its packages: conda env export > environment.yml

Envs Path

  1. 更改 packages 安装路径,/home 空间不够了

    (2024-06-25)

    我在 3dgs 的 repo 里看到过关于安装 env 到其他路径,然后搜索: conda config --add pkgs_dirs <Drive>/<pkg_path> in DDG

    Ref: Change conda default pkgs_dirs and envs dirs -SO

    1. 移动 pkgs 文件夹到另一个 anaconda 目录下:(base) zichen@lambda-server:~$ mv anaconda3/pkgs/ /data2/zichen/anaconda/

    2. 在 .condarc 中添加搜索路径:

      可以用命令:(base) zichen@lambda-server:~$ conda config --add pkgs_dirs /data2/zichen/anaconda/pkgs/

      或者直接编辑 .condarc:

      1
      2
      
      pkgs_dirs:
        - /data2/zichen/anaconda/pkgs
      
    3. 仍然可以像以前一样进入环境:conda activate gaussian_splatting

      或者: (base) zichen@lambda-server:~$ conda activate /home/zichen/anaconda3/envs/gaussian_splatting/

    4. 创建环境:conda env create --file environment.yml --prefix /data2/zichen/anaconda/envs/gaussian_splatting

  2. 更改 envs 路径:

    1. 添加搜索路径:(base) zichen@lambda-server:~$ conda config --add envs_dirs /data2/zichen/anaconda/envs/, 然后就能识别到安装在 /data2/zichen 中的环境了。
    • 我今天就先不移动了,我担心有的环境变量还得改。我的一个环境4-6个GB,主要以前为了做 SNN,存储的NeRF中间特征向量体积太大。

    (2024/09/20)

    • 动机:想重装系统,把 /home/zichen 下的 anaconda 文件夹迁移到 /data (机械硬盘) 上

    • 如果移动整个 anaconda3 文件夹到 /data,则 conda 无法找到,报错:

      1
      2
      
      zichen@homepc:~$ conda
      bash: /home/zichen/anaconda3/bin/conda: No such file or directory
      
      • 只移动 envs 和 pkgs 就好,他俩占主要的体积
    • 步骤: Conda - Docs

      1
      2
      3
      4
      5
      6
      
      # 1. 只移动 anaconda3 文件夹下的 envs 和 pkgs
      mv /home/zichen/anaconda3/envs /data/anaconda3/
      mv /home/zichen/anaconda3/pkgs /data/anaconda3/
      
      # 2. 在 .condarc 中添加配置
      vim ~/.condarc
      

      在 ~/.condarc 中添加配置:


Miniconda on Drive

Problems:

  1. Since my /home directory gets wiped whenever I reinstall my system, I don’t want to reinstall Conda each time. Instead, I’m considering installing it on a separate hard drive.

  2. Conda packages consume a lot of storage space, so I don’t want to store them on my SSD. However, I’m unsure whether separating the conda binaries (core installation) and python package (envs) advisable.

    • /home can be mounted to a dedicated SSD partition excluded from formatting during reinstallation, preserving all configurations and data.
  3. Storing both conda binaries and python packages on an Hard drive disk ensures portability: I can access my personalized environments in another machine by just mounting my HDD.

    If you install Conda’s core on the SSD but keep packages on the HDD, environments become SSD-dependent. Without the SSD, Conda (and its core paths) would be missing, rendering the HDD-stored packages unusable.


Notes:

  1. Install miniconda in $HOME and edit .condarc to specify paths to envs and pkgs. r1-DS

    • References: {{{

      1. DeepSeek
      2. DeepSeek
      3. conda init and conda activate — conda 25.3.1.dev6 documentation
        • Searched by conda init in DDG
      4. Installing Miniconda - Anaconda }}}
    • Supports:

      (2025-04-01)

      1. Conda Command Speed on HDD

        Conda commands (e.g., conda install, conda create) and environment activation will be slower on an HDD compared to an SSD due to the HDD’s higher latency and lower read/write speeds.

        However, once a Python environment is loaded, runtime performance (e.g., executing scripts) is less affected.

      2. Partitioning SSD for Persistence

        Partition the SDD into / (root) and /home in the next reinstallation. Such that the /home part can keep persistent without being wiped in reinstallations later on.

        And then, no bother to reinstall the conda installed in /home.

        • Even with a persistent /home, maintain backups (cloud/external drive). Partitions can still be accidentally formatted, and SSDs can fail.

        • Partitioning won’t harm SSD lifespan, as the partitions are logical divisions, no mapping to fixed physical locations.

      3. Using Conda Environments Across Machines

        If I want to use my environment (could be stored on hard drive) on others machine, there are two approches: One is use conda pack create a portable archive of the env (.tar.gz), and the other one is reference the env via --prefix (e.g., conda activate --prefix /mnt/hdd/envs/my_env).

        • Conda installed on an HDD with Linux installation is not compatible with Windows system. In the end, only packages are reuseable.
      4. Using Conda on an External Drive

        If conda is installed in external drive, it should be added in PATH and define a conda shell function. This step can be done with conda init r2-DS, r3-Docs

        Initialization is to provide a conda shell function that allows the Python code to interact with the shell context more intimately. It also allows a cleaner PATH manipulation and snappier responses in some conda commands.

        • If the mount point changes, the PATH need to be updated. (I don’t like this)
    • Actions:

      1. Install in $HOMEr4-Docs

        1
        2
        3
        4
        
        mkdir -p ~/miniconda3
        wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
        bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
        rm ~/miniconda3/miniconda.sh
        
        • If the /bin hasn’t been appended to $PATH, conda is not recognized.

          To execute conda init, first enter to the base env by executing:

          1
          
          source ~/miniconda3/bin/activate
          
        • conda init --all update $PATH on all currently available shells:

           1
           2
           3
           4
           5
           6
           7
           8
           9
          10
          11
          12
          13
          14
          15
          16
          17
          
          (base) zichen@zichen-X570-AORUS-PRO-WIFI:~$ conda init --all
          no change     /home/zichen/miniconda3/condabin/conda
          no change     /home/zichen/miniconda3/bin/conda
          no change     /home/zichen/miniconda3/bin/conda-env
          no change     /home/zichen/miniconda3/bin/activate
          no change     /home/zichen/miniconda3/bin/deactivate
          no change     /home/zichen/miniconda3/etc/profile.d/conda.sh
          no change     /home/zichen/miniconda3/etc/fish/conf.d/conda.fish
          no change     /home/zichen/miniconda3/shell/condabin/Conda.psm1
          no change     /home/zichen/miniconda3/shell/condabin/conda-hook.ps1
          no change     /home/zichen/miniconda3/lib/python3.12/site-packages/xontrib/conda.xsh
          no change     /home/zichen/miniconda3/etc/profile.d/conda.csh
          modified      /home/zichen/.bashrc
          modified      /home/zichen/.zshrc
          modified      /home/zichen/.config/fish/config.fish
          modified      /home/zichen/.xonshrc
          modified      /home/zichen/.tcshrc
          
      2. Edit .condarc:

        1
        2
        3
        4
        5
        6
        
        # ~/.condarc
        pkgs_dirs:
        - /mnt/Seagate4T/anaconda3/pkgs  # Package cache (downloaded .tar.bz2 files)
        
        envs_dirs:
        - /mnt/Seagate4T/anaconda3/envs
        
    • Results:

      1. Packages and environments will be stored in the specified directories.

venv

  1. Compare venv and conda

    • References:

      1. 从pip到uv:一口气梳理现代Python项目管理全流程! - 隔壁的程序员老王
    • Supports:

      (2025-09-05T23:16)

      1. venv 只能管理 python 项目,Conda 可以管理其他语言的项目

        • Conda 有自己的项目管理逻辑,而 Python 官方现在使用 pyproject.toml
        • 直接使用 pip install/uninstall,间接的依赖包不会被删除,而使用 pyproject.toml 就可以解决这个问题。
        • Conda 没有硬链接,所以依赖包占用体积很大,UV (pyproject.toml) 会检查重复的包

  1. Basic Usages


direnv

  1. Basic Usages


Docker For Py Dev

Pros

  1. Problems:

    1. Compare Docker and Virtual Env
  2. Supports:

    (2025-09-09T21:35)

    1. Docker 适合后台常驻的 App。 如果在开发阶段,每一个项目的环境不同,所以需要单独创建一个容器。

      Docker 的优点是:

      • 数据文件夹可以自动挂载,不必操心文件路径

      • 目录结构简单,运行结果不会与其他项目混淆

    (2025-09-23T12:57)

    1. Docker 可以解决 cuda 版本的问题。开发不同项目时,不用费心修改特定版本的 cuda binary 的软链接了,以及环境变量,compiler gcc 的版本都可以在 .env 中设定。 或者有时无法切换 host 中的版本,比如没有 sudo 权限。 r2-Disc

      • 可执行程序 cuda inside /usr/local 是一个软连接,指向特定版本的 cuda:

        /usr/local
        1
        2
        3
        4
        5
        
        (base) zichen@zichen-X570-AORUS-PRO-WIFI:/usr/local$ tree -L 1
        .
        ├── bin
        ├── cuda -> /usr/local/cuda-11.3/
        ├── cuda-11.3
        

    ::: aside

    References {{{ 1. [Gemini 2.5P - Docker 容器存储空间分析与优化](https://g.co/gemini/share/1d271d05d23b) 2. [Discord - MrNeRF & Brush](https://discord.com/channels/1293599119989805087/1388829600427020318/1419822110053765250) }}}
    :::

Cons

 2. 缺点

    * 我每次要进入项目环境,还需要重新构建容器,python 安装包还要重新下载?

    * 不同 container 之间不可复用 package,浪费存储空间,而 uv 好像可以复用

 (2025-09-14T17:25)

 3. 容器的体积占用

    * 能否把 host 的 package 挂载到 container 里,从而复用?

Package Manager

pip

  • Update package: pip install --upgrade numpy

  • List all available versions: pip install versions numpy (SO)


UV

Install UV

  1. Supports:

    1. Install uv with standalone installer r1-astral

    ::: aside

    References {{{ 1. [GitHub - astral-sh/uv: An extremely fast Python package and project ...]() }}}
    :::

Python Dev Pipeline

  1. Problems:

    1. Use UV to handle the whole pipeline of python porject development
  2. Supports

    1. Five steps of developing a Python project r2-一切

      1. Python 安装: Official release, apt/yum, pyenv

      2. 虚拟环境:venv, virtual env

      3. 依赖管理:pip, pipenv, poetry

      4. 工具安装:pipx

      5. 打包发布:pip

    ::: aside


UV Manages Environment

  1. Problems:

    1. Python programs require situable environment to run correctly

  1. Supports:

    1. Two conditions of an Python environment:

      1. Python version

      2. Dependencies


UV Install Python

  1. Problems:

    1. Install a Python using UV

  1. Supports:

    1. List all available version of python:

      1
      
      uv python list
      
    2. Install a specific Python: uv python install <python_version>

      1
      
      uv python install cpython-3.12
      

UV Install Packages

  1. Problems:

    1. Install a package into the current project

  1. Supports:

    1. Installing a dependency creates a .venv environment (directory):

      1
      
      uv add pydantic_ai
      
      • Project dependencies are recorded in pyproject.toml
    2. Indicate a dependency that should not be included in the packaged application

      1
      
      uv add ruff --dev
      
      • --dev 通常用于限定:与代码实现相关的依赖,比如单元测试用到的 pytest 或者 mock
      • ruff 属于一个“工具”,用于检查规范,与代码实现不相关
    3. Install tool packages into the system directory (~/.local/bin)

      1
      
      uv tool install ruff
      
      • This package is independently executable out of the current project, because it has its own environment.

UV Uninstall Packages

  1. Supports:

    1. Remove package

      1
      
      uv remove ruff --dev
      

UV Run

Run Script

  1. Supports:

    1. Run a script using a specific version of Python

      1
      
      uv run -p 3.12 <script_name>
      
    2. Run a specific version of Python

      1
      2
      
      uv run -p 3.12 python
      uv run -p pypy python
      
      • If the specified version doesn’t exist yet, UV will install it automatically:
    3. Run a script using the current envrionment

      1
      
      uv run <script_name> [args]
      

UV Init

  1. Supports:

    1. uv init converts an empty folder to a uv project:

      Generated files {{{
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      
      zichen@zichen-X570-AORUS-PRO-WIFI:~/Downloads/uv_test_tmp$ uv init
      Initialized project `uv-test-tmp`
      
      zichen@zichen-X570-AORUS-PRO-WIFI:~/Downloads/uv_test_tmp$ tree -L 1 -a
      .
      ├── .git
      ├── .gitignore
      ├── main.py
      ├── pyproject.toml
      ├── .python-version
      └── README.md
      
      1 directory, 5 files
      

      }}}

    2. Create a uv project with a specific version of python

      1
      
      uv init -p 3.13
      
      • Python version is specified in the file .python-version

UV Tree

  1. Problems:

    1. Print the dependency relationships between the various packages in the current project.

  1. Supports:

    1. Display package tree:

      1
      
      uv tree
      

UV Tool

Check Installed Tools

  1. Problems:

    1. Packages that installed as tools are installed into system folders, so its active domain is across project-level environments.

  1. Supports:

    1. List all tools

      1
      
      uv tool list
      

UV Packages a Project

  1. Problems:

    1. Build a project to a single executable package

  1. Supports:

    1. Edit pyproject.toml and execute uv build

      • Add section project.scripts

        1
        2
        3
        
        [project.scripts]
        # <custom_package_name> = "<script_without_extension>:<func_name>"
        ai = "ai:main"
        
    2. uv build packages the project to a .whl file, which can be installed through uv add or uv tool install.

      1
      
      uv tool install dist/test-0.1.0-py3-none-any.whl
      

Example of ai.py Script

  1. Problems:

    1. Run the example script cradiator/ai.py

    ::: aside


  1. Supports:

    1. Clone from gist

      1
      
      ~/Projects$ git clone https://gist.github.com/b486a3148be3ab63ae7d0c5376fcf783.git
      

  1. Actions:

    1. Initialize the folder as a uv project

      1
      
      ~/Projects/script-cradiator_ai$ uv init
      
    2. Switch environment:

      1
      
      ~/Projects/script-cradiator_ai$ source .venv/bin/activate
      
    3. Install dependencies into the current environment

      1
      
      uv add "pydantic-ai-slim[google]"
      
    4. Edit script

      • Set the Gemini API key as an environment variable r1-Docs

        1
        
        export GOOGLE_API_KEY=your-api-key
        
      • Update script with the new version of pydantic-ai (1.1.0) r3-Claude

    5. Run script

      1
      
      uv run ai_claude.py List files
      
      • Run failed. The script contains bugs that still need to be fixed.

    ::: aside

    1. Google - Pydantic AI
    2. Gemini 2.5P - Fix Gemini API Key Error
    3. Claude :::

Notebook

Jupyter


Marimo

Notes:

  1. 教学工具


Jupyter Docker Stacks

  1. Problems:

    1. Use notebook from browser without opening VSCode

base-notebook Image

  1. Problems:

    1. Jupyter provides various images as a pre-setup of developing specific applications r2-GitHub.

      I want to use notebook to practice the usage of some packages.

  2. Supports:

    1. Run base-notebook container r1-Docs

    ::: aside

    References {{{ 1. [Data science with JupyterLab | Docker Docs](https://docs.docker.com/guides/jupyter/)
    Searched by `jupyterlab docker` at [DDG](https://duckduckgo.com/?q=jupyterlab+docker&ia=web) 2. [Jupyter Docker Stacks - GitHub](https://github.com/jupyter/docker-stacks) }}}
    :::
Built with Hugo
Theme Stack designed by Jimmy