LLMOps-第二周作业

部署运行你感兴趣的模型镜像

LLMOps-第二周作业

1、部署Miniconda环境,熟练进行virtual env管理;
2、部署JupyterLab,可以熟练使用JupyterLab编辑、运行Python程序;
3、熟悉NumPy数组创建、复制、矩阵运算和广播机制;

部署Miniconda环境

简要说明

本文基于SUSE 15 SP3 X86环境部署

hooper@python60:~> cat /etc/os-release 
# NAME="SLES"
# VERSION="15-SP3"
# VERSION_ID="15.3"
# PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"
# ID="sles"
# ID_LIKE="suse"
# ANSI_COLOR="0;32"
# CPE_NAME="cpe:/o:suse:sles:15:sp3"
# DOCUMENTATION_URL="https://documentation.suse.com/"

部署Miniconda

# 下载Miniconda安装包
# https://www.anaconda.com/docs/getting-started/miniconda/install
hooper@python60:~> cd /data/soft/
hooper@python60:/data/soft> wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# --2025-07-07 09:51:03--  https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# Resolving repo.anaconda.com (repo.anaconda.com)... 104.16.32.241, 104.16.191.158, 2606:4700::6810:20f1, ...
# Connecting to repo.anaconda.com (repo.anaconda.com)|104.16.32.241|:443... connected.
# HTTP request sent, awaiting response... 200 OK
# Length: 159476510 (152M) [application/octet-stream]
# Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’

# Miniconda3-latest-Linux-x86_64.sh     100%[=============================================================================>] 152.09M  6.07MB/s    in 29s     

# 2025-07-07 09:51:33 (5.23 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [159476510/159476510]

# 安装Miniconda3并修改安装路径
hooper@python60:/data/soft> sudo bash Miniconda3-latest-Linux-x86_64.sh 

# Welcome to Miniconda3 py313_25.5.1-0

# In order to continue the installation process, please review the license
# agreement.
# Please, press ENTER to continue
# >>> 
# MINICONDA END USER LICENSE AGREEMENT

# Copyright Notice: Miniconda(R) (C) 2015, Anaconda, Inc.
# All rights reserved. Miniconda(R) is licensed, not sold.

# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer;

# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or 
# other materials provided with the distribution;

# 3. The name Anaconda, Inc. or Miniconda(R) may not be used to endorse or promote products derived from this software without specific prior written permission
#  from Anaconda, Inc.; and

# 4. Miniconda(R) may not be used to access or allow third parties to access Anaconda package repositories if such use would circumvent paid licensing requireme
# nts or is otherwise restricted by the Anaconda Terms of Service.

# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ANACONDA "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERC
# HANTABILITY, FITNESS FOR A PARTICULAR PURPOSE , AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL
# , SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI
# NG IN ANY WAY OUT OF THE USE OF MINICONDA(R), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


# Do you accept the license terms? [yes|no]
# >>> 
# Please answer 'yes' or 'no':'
# >>> yes

# Miniconda3 will now be installed into this location:
# /root/miniconda3

#   - Press ENTER to confirm the location
#   - Press CTRL-C to abort the installation
#   - Or specify a different location below

# 修改安装路径
# [/root/miniconda3] >>> /usr/local/miniconda3
# PREFIX=/usr/local/miniconda3
# Unpacking payload ...
# entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
# entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
                                                                                                                                                              
# Installing base environment...


# Downloading and Extracting Packages:


# ## Package Plan ##

#   environment location: /usr/local/miniconda3

#   added / updated specs:
#     - defaults/linux-64::_libgcc_mutex==0.1=main[md5=c3473ff8bdb3d124ed5ff11ec380d6f9]
#     - defaults/linux-64::_openmp_mutex==5.1=1_gnu[md5=71d281e9c2192cb3fa425655a8defb85]
#     - defaults/linux-64::anaconda-anon-usage==0.7.1=py313hfc0e8ea_100[md5=8051dd5034cbe000becc368ae14cc5ef]
#     - defaults/linux-64::annotated-types==0.6.0=py313h06a4308_0[md5=4dc276db59e14eaf187426b0040eb209]
#     - defaults/linux-64::boltons==24.1.0=py313h06a4308_0[md5=fc8dcc37f16fbed6bae9d6950df53fe1]
#     - defaults/linux-64::brotli-python==1.0.9=py313h6a678d5_9[md5=48f87f78b5774d723589e95ed14daafe]
#     - defaults/linux-64::bzip2==1.0.8=h5eee18b_6[md5=f21a3ff51c1b271977f53ce956a69297]
#     - defaults/linux-64::c-ares==1.19.1=h5eee18b_0[md5=6cfbce52273a1cb888821f18ceaa83c4]
#     - defaults/linux-64::ca-certificates==2025.2.25=h06a4308_0[md5=495015d24da8ad929e3ae2d18571016d]
#     - defaults/linux-64::certifi==2025.4.26=py313h06a4308_0[md5=d99fbc94185f7af92889b3647b2aae93]
#     - defaults/linux-64::cffi==1.17.1=py313h1fdaa30_1[md5=c5d4f727e7bccd4bd8d599e049853383]
#     - defaults/linux-64::conda-anaconda-telemetry==0.1.2=py313h06a4308_1[md5=2d1b1b3f339fb81ee8a55b778da10a25]
#     - defaults/linux-64::conda-anaconda-tos==0.2.0=py313h06a4308_0[md5=27c954b72f842d68c4df320d8f65213c]
#     - defaults/linux-64::conda-content-trust==0.2.0=py313h06a4308_1[md5=aefc551e21e13ecc1de44ee589aea77d]
#     - defaults/linux-64::conda-package-handling==2.4.0=py313h06a4308_0[md5=76b17c263bc01eaffebcb8ba7ccd6ca9]
#     - defaults/linux-64::conda-package-streaming==0.11.0=py313h06a4308_0[md5=b717717a2265676cc8c9c933c86ec7e1]
#     - defaults/linux-64::conda==25.5.1=py313h06a4308_0[md5=0d4373f00a49a65830e2ea995b654e98]
#     - defaults/linux-64::cpp-expected==1.1.0=hdb19cb5_0[md5=3a195bcf47b691adb4a635a8b7f396f7]
#     - defaults/linux-64::cryptography==45.0.3=py313h2ccb017_0[md5=50a9a59ddbcfe7912aae0a81cd7e31b1]
#     - defaults/linux-64::distro==1.9.0=py313h06a4308_0[md5=1fd7ab065e9958e7bbd4d3fbf175742b]
#     - defaults/linux-64::expat==2.7.1=h6a678d5_0[md5=269942a9f3f943e2e5d8a2516a861f7c]
#     - defaults/linux-64::fmt==9.1.0=hdb19cb5_1[md5=4f12930203ff2d84df5d287af9b29858]
#     - defaults/linux-64::frozendict==2.4.2=py313h06a4308_0[md5=31f7036f9bdd3592e660ecfc631f054f]
#     - defaults/linux-64::icu==73.1=h6a678d5_0[md5=6d09df641fc23f7d277a04dc7ea32dd4]
#     - defaults/linux-64::idna==3.7=py313h06a4308_0[md5=f3e7d3ba37b45ef8782dd643d7e9733b]
#     - defaults/linux-64::jsonpatch==1.33=py313h06a4308_1[md5=8cb4b1755a4a8fd6a57883863236ef2b]
#     - defaults/linux-64::krb5==1.20.1=h143b758_1[md5=cf1accc86321fa25d6b978cc748039ae]
#     - defaults/linux-64::ld_impl_linux-64==2.40=h12ee557_0[md5=ee672b5f635340734f58d618b7bca024]
#     - defaults/linux-64::libarchive==3.7.7=hfab0078_0[md5=c208e4f83c30250d659102b271e8d4e6]
#     - defaults/linux-64::libcurl==8.12.1=hc9e6f67_0[md5=2904da5e450707a95d420b55b6b88d19]
#     - defaults/linux-64::libedit==3.1.20230828=h5eee18b_0[md5=850eb5a9d2d7d3c66cce12e84406ca08]
#     - defaults/linux-64::libev==4.33=h7f8727e_1[md5=5065620db4393fb549f30114a33897d1]
#     - defaults/linux-64::libffi==3.4.4=h6a678d5_1[md5=70646cc713f0c43926cfdcfe9b695fe0]
#     - defaults/linux-64::libgcc-ng==11.2.0=h1234567_1[md5=a87728dabf3151fb9cfa990bd2eb0464]
#     - defaults/linux-64::libgomp==11.2.0=h1234567_1[md5=b372c0eea9b60732fdae4b817a63c8cd]
#     - defaults/linux-64::libmamba==2.0.5=haf1ee3a_1[md5=0f1450592dc7555e315f5d684ce481eb]
#     - defaults/linux-64::libmambapy==2.0.5=py313hdb19cb5_1[md5=c56ed0c34af1a360984e20bf13200007]
#     - defaults/linux-64::libmpdec==4.0.0=h5eee18b_0[md5=feb10f42b1a7b523acbf85461be41a3e]
#     - defaults/linux-64::libnghttp2==1.57.0=h2d74bed_0[md5=674871621300f54e7ffcf93e6e341638]
#     - defaults/linux-64::libsolv==0.7.30=he621ea3_1[md5=6918c29c4b65f21c71aac679b49c02e4]
#     - defaults/linux-64::libssh2==1.11.1=h251f7ec_0[md5=dd68c24355431c0543339dda1404129d]
#     - defaults/linux-64::libstdcxx-ng==11.2.0=h1234567_1[md5=57623d10a70e09e1d048c2b2b6f4e2dd]
#     - defaults/linux-64::libuuid==1.41.5=h5eee18b_0[md5=4a6a2354414c9080327274aa514e5299]
#     - defaults/linux-64::libxcb==1.17.0=h9b100fa_0[md5=fdf0d380fa3809a301e2dbc0d5183883]
#     - defaults/linux-64::libxml2==2.13.8=hfdd30dd_0[md5=6da89b526f12f128af101c3f70d12c6d]
#     - defaults/linux-64::lz4-c==1.9.4=h6a678d5_1[md5=2ee58861f2b92b868ce761abb831819d]
#     - defaults/linux-64::markdown-it-py==2.2.0=py313h06a4308_1[md5=0c3ee40437213e528c99bff0bcc5a942]
#     - defaults/linux-64::mdurl==0.1.0=py313h06a4308_0[md5=5bca585008b9e6ce6997871309117479]
#     - defaults/linux-64::menuinst==2.2.0=py313h06a4308_1[md5=feb4995cd9f70c1925dcf18449ada963]
#     - defaults/linux-64::ncurses==6.4=h6a678d5_0[md5=5558eec6e2191741a92f832ea826251c]
#     - defaults/linux-64::nlohmann_json==3.11.2=h6a678d5_0[md5=36890f7abd98066b607211b1773e6343]
#     - defaults/linux-64::openssl==3.0.16=h5eee18b_0[md5=5875526739afa058cfa84da1fa7a2ef4]
#     - defaults/linux-64::packaging==24.2=py313h06a4308_0[md5=b7961f58a4d39d20c51d6954e74340e8]
#     - defaults/linux-64::pcre2==10.42=hebb0a14_1[md5=727e15c3cfa02b032da4eb0c1123e977]
#     - defaults/linux-64::platformdirs==4.3.7=py313h06a4308_0[md5=6cdbb54f78166c07399004f961726487]
#     - defaults/linux-64::pluggy==1.5.0=py313h06a4308_0[md5=ea142d52281afe8e9a79e4a33c023e41]
#     - defaults/linux-64::pthread-stubs==0.3=h0ce48e5_1[md5=973a642312d2a28927aaf5b477c67250]
#     - defaults/linux-64::pycosat==0.6.6=py313h5eee18b_2[md5=60ea7416e08d78563e31d16c333bd57f]
#     - defaults/linux-64::pydantic-core==2.27.1=py313h4aa5aa6_0[md5=3d619f57beecf895d3601d2ff21bfed9]
#     - defaults/linux-64::pydantic==2.10.3=py313h06a4308_0[md5=3e66cfc68bf5e244f7d983a37d52058f]
#     - defaults/linux-64::pygments==2.19.1=py313h06a4308_0[md5=8fcbba71964f3d4d936e846c3bc9fb13]
#     - defaults/linux-64::pysocks==1.7.1=py313h06a4308_0[md5=a493580ce366b942a8e1c00ee00c4182]
#     - defaults/linux-64::python==3.13.5=h4612cfd_100_cp313[md5=1adf42b71c42a4a540eae2c0026f02c3]
#     - defaults/linux-64::python_abi==3.13=0_cp313[md5=d4009c49dd2b54ffded7f1365b5f6505]
#     - defaults/linux-64::readline==8.2=h5eee18b_0[md5=be42180685cce6e6b0329201d9f48efb]
#     - defaults/linux-64::reproc-cpp==14.2.4=h6a678d5_2[md5=b03aa4903158279f003e7032ab9f5601]
#     - defaults/linux-64::reproc==14.2.4=h6a678d5_2[md5=3c6dbc6c60b3897222d79359343e90fa]
#     - defaults/linux-64::requests==2.32.3=py313h06a4308_1[md5=119859bcf1462b08bc8f8b672877eb85]
#     - defaults/linux-64::rich==13.9.4=py313h06a4308_0[md5=29573c0e57aea86c5d68759975638187]
#     - defaults/linux-64::ruamel.yaml.clib==0.2.12=py313h5eee18b_0[md5=d9da5a7327cd6c9ee11d7b7ac1b7d082]
#     - defaults/linux-64::ruamel.yaml==0.18.10=py313h5eee18b_0[md5=70c6985c0871d511a94afb1e8537943f]
#     - defaults/linux-64::setuptools==78.1.1=py313h06a4308_0[md5=8f8e1c1e3af9d2d371aaa0ee8316ae7c]
#     - defaults/linux-64::simdjson==3.10.1=hdb19cb5_0[md5=7b2a4b5be590071e1b4dce77b413d26a]
#     - defaults/linux-64::spdlog==1.11.0=hdb19cb5_0[md5=023cfe6341f1d90dee2016e608538537]
#     - defaults/linux-64::sqlite==3.45.3=h5eee18b_0[md5=acf93d6aceb74d6110e20b44cc45939e]
#     - defaults/linux-64::tk==8.6.14=h993c535_1[md5=bfe656b29fc64afe5d4bd46dbd5fd240]
#     - defaults/linux-64::tqdm==4.67.1=py313h7040dfc_0[md5=2efb4b3310f058cb95d326989bddc761]
#     - defaults/linux-64::truststore==0.10.0=py313h06a4308_0[md5=ab3e76bdc25cd61781ea691d7ab8fc2c]
#     - defaults/linux-64::typing-extensions==4.12.2=py313h06a4308_0[md5=f011fee76cd912d47567c6cedb0074c9]
#     - defaults/linux-64::typing_extensions==4.12.2=py313h06a4308_0[md5=e1a419944c11dc4592cdce114d0a3063]
#     - defaults/linux-64::urllib3==2.3.0=py313h06a4308_0[md5=293df67437af6ad722c9c7f2ddcf0e2c]
#     - defaults/linux-64::wheel==0.45.1=py313h06a4308_0[md5=29057e876eedce0e37c2388c138a19f9]
#     - defaults/linux-64::xorg-libx11==1.8.12=h9b100fa_1[md5=6298b27afae6f49f03765b2a03df2fcb]
#     - defaults/linux-64::xorg-libxau==1.0.12=h9b100fa_0[md5=a8005a9f6eb903e113cd5363e8a11459]
#     - defaults/linux-64::xorg-libxdmcp==1.1.5=h9b100fa_0[md5=c284a09ddfba81d9c4e740110f09ea06]
#     - defaults/linux-64::xorg-xorgproto==2024.1=h5eee18b_1[md5=412a0d97a7a51d23326e57226189da92]
#     - defaults/linux-64::xz==5.6.4=h5eee18b_1[md5=3581505fa450962d631bd82b8616350e]
#     - defaults/linux-64::yaml-cpp==0.8.0=h6a678d5_1[md5=015d2d74ad3c8e53eec3358637433718]
#     - defaults/linux-64::zlib==1.2.13=h5eee18b_1[md5=92e42d8310108b0a440fb2e60b2b2a25]
#     - defaults/linux-64::zstandard==0.23.0=py313h2c38b39_1[md5=5b4bd26f9d674331122482d3c2ac0afe]
#     - defaults/linux-64::zstd==1.5.6=hc292b87_0[md5=78ae7abd3020b41f827b35085845e1b8]
#     - defaults/noarch::archspec==0.2.3=pyhd3eb1b0_0[md5=13d01ee2d343d8539bb47055a6c0b5b2]
#     - defaults/noarch::charset-normalizer==3.3.2=pyhd3eb1b0_0[md5=c6fea3691e85cf7f568b0618ec29fc4f]
#     - defaults/noarch::conda-libmamba-solver==25.4.0=pyhd3eb1b0_0[md5=77ff27567894c7ea3eb908489e5d3e5c]
#     - defaults/noarch::jsonpointer==2.1=pyhd3eb1b0_0[md5=298ff809e733cb04366e4e629c65aa8d]
#     - defaults/noarch::pip==25.1=pyhc872135_2[md5=2778327d2a700153fefe0e69438b18e1]
#     - defaults/noarch::pybind11-abi==5=hd3eb1b0_0[md5=7f0df6639fdf60ccd3045ee6faedd32f]
#     - defaults/noarch::pycparser==2.21=pyhd3eb1b0_0[md5=135a72ff2a31150a3a3ff0b1edd41ca9]
#     - defaults/noarch::tzdata==2025b=h04d1e81_0[md5=1d027393db3427ab22a02aa44a56f143]


# The following NEW packages will be INSTALLED:

#   _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main 
#   _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu 
#   anaconda-anon-usa~ pkgs/main/linux-64::anaconda-anon-usage-0.7.1-py313hfc0e8ea_100 
#   annotated-types    pkgs/main/linux-64::annotated-types-0.6.0-py313h06a4308_0 
#   archspec           pkgs/main/noarch::archspec-0.2.3-pyhd3eb1b0_0 
#   boltons            pkgs/main/linux-64::boltons-24.1.0-py313h06a4308_0 
#   brotli-python      pkgs/main/linux-64::brotli-python-1.0.9-py313h6a678d5_9 
#   bzip2              pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 
#   c-ares             pkgs/main/linux-64::c-ares-1.19.1-h5eee18b_0 
#   ca-certificates    pkgs/main/linux-64::ca-certificates-2025.2.25-h06a4308_0 
#   certifi            pkgs/main/linux-64::certifi-2025.4.26-py313h06a4308_0 
#   cffi               pkgs/main/linux-64::cffi-1.17.1-py313h1fdaa30_1 
#   charset-normalizer pkgs/main/noarch::charset-normalizer-3.3.2-pyhd3eb1b0_0 
#   conda              pkgs/main/linux-64::conda-25.5.1-py313h06a4308_0 
#   conda-anaconda-te~ pkgs/main/linux-64::conda-anaconda-telemetry-0.1.2-py313h06a4308_1 
#   conda-anaconda-tos pkgs/main/linux-64::conda-anaconda-tos-0.2.0-py313h06a4308_0 
#   conda-content-tru~ pkgs/main/linux-64::conda-content-trust-0.2.0-py313h06a4308_1 
#   conda-libmamba-so~ pkgs/main/noarch::conda-libmamba-solver-25.4.0-pyhd3eb1b0_0 
#   conda-package-han~ pkgs/main/linux-64::conda-package-handling-2.4.0-py313h06a4308_0 
#   conda-package-str~ pkgs/main/linux-64::conda-package-streaming-0.11.0-py313h06a4308_0 
#   cpp-expected       pkgs/main/linux-64::cpp-expected-1.1.0-hdb19cb5_0 
#   cryptography       pkgs/main/linux-64::cryptography-45.0.3-py313h2ccb017_0 
#   distro             pkgs/main/linux-64::distro-1.9.0-py313h06a4308_0 
#   expat              pkgs/main/linux-64::expat-2.7.1-h6a678d5_0 
#   fmt                pkgs/main/linux-64::fmt-9.1.0-hdb19cb5_1 
#   frozendict         pkgs/main/linux-64::frozendict-2.4.2-py313h06a4308_0 
#   icu                pkgs/main/linux-64::icu-73.1-h6a678d5_0 
#   idna               pkgs/main/linux-64::idna-3.7-py313h06a4308_0 
#   jsonpatch          pkgs/main/linux-64::jsonpatch-1.33-py313h06a4308_1 
#   jsonpointer        pkgs/main/noarch::jsonpointer-2.1-pyhd3eb1b0_0 
#   krb5               pkgs/main/linux-64::krb5-1.20.1-h143b758_1 
#   ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.40-h12ee557_0 
#   libarchive         pkgs/main/linux-64::libarchive-3.7.7-hfab0078_0 
#   libcurl            pkgs/main/linux-64::libcurl-8.12.1-hc9e6f67_0 
#   libedit            pkgs/main/linux-64::libedit-3.1.20230828-h5eee18b_0 
#   libev              pkgs/main/linux-64::libev-4.33-h7f8727e_1 
#   libffi             pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 
#   libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 
#   libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 
#   libmamba           pkgs/main/linux-64::libmamba-2.0.5-haf1ee3a_1 
#   libmambapy         pkgs/main/linux-64::libmambapy-2.0.5-py313hdb19cb5_1 
#   libmpdec           pkgs/main/linux-64::libmpdec-4.0.0-h5eee18b_0 
#   libnghttp2         pkgs/main/linux-64::libnghttp2-1.57.0-h2d74bed_0 
#   libsolv            pkgs/main/linux-64::libsolv-0.7.30-he621ea3_1 
#   libssh2            pkgs/main/linux-64::libssh2-1.11.1-h251f7ec_0 
#   libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 
#   libuuid            pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 
#   libxcb             pkgs/main/linux-64::libxcb-1.17.0-h9b100fa_0 
#   libxml2            pkgs/main/linux-64::libxml2-2.13.8-hfdd30dd_0 
#   lz4-c              pkgs/main/linux-64::lz4-c-1.9.4-h6a678d5_1 
#   markdown-it-py     pkgs/main/linux-64::markdown-it-py-2.2.0-py313h06a4308_1 
#   mdurl              pkgs/main/linux-64::mdurl-0.1.0-py313h06a4308_0 
#   menuinst           pkgs/main/linux-64::menuinst-2.2.0-py313h06a4308_1 
#   ncurses            pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 
#   nlohmann_json      pkgs/main/linux-64::nlohmann_json-3.11.2-h6a678d5_0 
#   openssl            pkgs/main/linux-64::openssl-3.0.16-h5eee18b_0 
#   packaging          pkgs/main/linux-64::packaging-24.2-py313h06a4308_0 
#   pcre2              pkgs/main/linux-64::pcre2-10.42-hebb0a14_1 
#   pip                pkgs/main/noarch::pip-25.1-pyhc872135_2 
#   platformdirs       pkgs/main/linux-64::platformdirs-4.3.7-py313h06a4308_0 
#   pluggy             pkgs/main/linux-64::pluggy-1.5.0-py313h06a4308_0 
#   pthread-stubs      pkgs/main/linux-64::pthread-stubs-0.3-h0ce48e5_1 
#   pybind11-abi       pkgs/main/noarch::pybind11-abi-5-hd3eb1b0_0 
#   pycosat            pkgs/main/linux-64::pycosat-0.6.6-py313h5eee18b_2 
#   pycparser          pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0 
#   pydantic           pkgs/main/linux-64::pydantic-2.10.3-py313h06a4308_0 
#   pydantic-core      pkgs/main/linux-64::pydantic-core-2.27.1-py313h4aa5aa6_0 
#   pygments           pkgs/main/linux-64::pygments-2.19.1-py313h06a4308_0 
#   pysocks            pkgs/main/linux-64::pysocks-1.7.1-py313h06a4308_0 
#   python             pkgs/main/linux-64::python-3.13.5-h4612cfd_100_cp313 
#   python_abi         pkgs/main/linux-64::python_abi-3.13-0_cp313 
#   readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0 
#   reproc             pkgs/main/linux-64::reproc-14.2.4-h6a678d5_2 
#   reproc-cpp         pkgs/main/linux-64::reproc-cpp-14.2.4-h6a678d5_2 
#   requests           pkgs/main/linux-64::requests-2.32.3-py313h06a4308_1 
#   rich               pkgs/main/linux-64::rich-13.9.4-py313h06a4308_0 
#   ruamel.yaml        pkgs/main/linux-64::ruamel.yaml-0.18.10-py313h5eee18b_0 
#   ruamel.yaml.clib   pkgs/main/linux-64::ruamel.yaml.clib-0.2.12-py313h5eee18b_0 
#   setuptools         pkgs/main/linux-64::setuptools-78.1.1-py313h06a4308_0 
#   simdjson           pkgs/main/linux-64::simdjson-3.10.1-hdb19cb5_0 
#   spdlog             pkgs/main/linux-64::spdlog-1.11.0-hdb19cb5_0 
#   sqlite             pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 
#   tk                 pkgs/main/linux-64::tk-8.6.14-h993c535_1 
#   tqdm               pkgs/main/linux-64::tqdm-4.67.1-py313h7040dfc_0 
#   truststore         pkgs/main/linux-64::truststore-0.10.0-py313h06a4308_0 
#   typing-extensions  pkgs/main/linux-64::typing-extensions-4.12.2-py313h06a4308_0 
#   typing_extensions  pkgs/main/linux-64::typing_extensions-4.12.2-py313h06a4308_0 
#   tzdata             pkgs/main/noarch::tzdata-2025b-h04d1e81_0 
#   urllib3            pkgs/main/linux-64::urllib3-2.3.0-py313h06a4308_0 
#   wheel              pkgs/main/linux-64::wheel-0.45.1-py313h06a4308_0 
#   xorg-libx11        pkgs/main/linux-64::xorg-libx11-1.8.12-h9b100fa_1 
#   xorg-libxau        pkgs/main/linux-64::xorg-libxau-1.0.12-h9b100fa_0 
#   xorg-libxdmcp      pkgs/main/linux-64::xorg-libxdmcp-1.1.5-h9b100fa_0 
#   xorg-xorgproto     pkgs/main/linux-64::xorg-xorgproto-2024.1-h5eee18b_1 
#   xz                 pkgs/main/linux-64::xz-5.6.4-h5eee18b_1 
#   yaml-cpp           pkgs/main/linux-64::yaml-cpp-0.8.0-h6a678d5_1 
#   zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 
#   zstandard          pkgs/main/linux-64::zstandard-0.23.0-py313h2c38b39_1 
#   zstd               pkgs/main/linux-64::zstd-1.5.6-hc292b87_0 



# Downloading and Extracting Packages:

# Preparing transaction: done
# Executing transaction: done
# entry_point.py:256: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
# installation finished.
# Do you wish to update your shell profile to automatically initialize conda?
# This will activate conda on startup and change the command prompt when activated.
# If you'd prefer that conda's base environment not be activated on startup,
#    run the following command when conda is activated:

# conda config --set auto_activate_base false

# You can undo this by running `conda init --reverse $SHELL`? [yes|no]
# [no] >>> 

# You have chosen to not have conda modify your shell scripts at all.
# To activate conda's base environment in your current shell session:

# eval "$(/usr/local/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)" 

# To install conda's shell functions for easier access, first activate, then:

# conda init

# Thank you for installing Miniconda3!

# 激活环境
hooper@python60:/data/soft> echo $SHELL
/bin/bash
hooper@python60:/data/soft> eval "$(/usr/local/miniconda3/bin/conda shell.bash hook)" 
(base) hooper@python60:/data/soft> 

# 初始化conda
(base) hooper@python60:/data/soft> conda init
# no change     /usr/local/miniconda3/condabin/conda
# no change     /usr/local/miniconda3/bin/conda
# no change     /usr/local/miniconda3/bin/conda-env
# no change     /usr/local/miniconda3/bin/activate
# no change     /usr/local/miniconda3/bin/deactivate
# no change     /usr/local/miniconda3/etc/profile.d/conda.sh
# no change     /usr/local/miniconda3/etc/fish/conf.d/conda.fish
# no change     /usr/local/miniconda3/shell/condabin/Conda.psm1
# no change     /usr/local/miniconda3/shell/condabin/conda-hook.ps1
# no change     /usr/local/miniconda3/lib/python3.13/site-packages/xontrib/conda.xsh
# no change     /usr/local/miniconda3/etc/profile.d/conda.csh
# modified      /home/hooper/.bashrc

# ==> For changes to take effect, close and re-open your current shell. <==

# 添加conda国内镜像源
(base) hooper@python60:~> conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
(base) hooper@python60:~> conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
(base) hooper@python60:~> conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
(base) hooper@python60:~> conda config --set show_channel_urls yes
# 验证
(base) hooper@python60:~> conda config --show channels
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - defaults

# 添加命令补全
(base) hooper@python60:~> sudo /usr/local/miniconda3/bin/conda install conda-bash-completion -n base -c conda-forge
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /usr/local/miniconda3

  added / updated specs:
    - conda-bash-completion


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bash-completion-2.11       |       ha770c72_1         205 KB  conda-forge
    ca-certificates-2025.6.15  |       hbd8a1cb_0         148 KB  conda-forge
    certifi-2025.6.15          |     pyhd8ed1ab_0         152 KB  conda-forge
    conda-bash-completion-1.7  |       ha770c72_1          21 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         526 KB

The following NEW packages will be INSTALLED:

  bash-completion    conda-forge/linux-64::bash-completion-2.11-ha770c72_1 
  conda-bash-comple~ conda-forge/linux-64::conda-bash-completion-1.7-ha770c72_1 

The following packages will be UPDATED:

  ca-certificates    pkgs/main/linux-64::ca-certificates-2~ --> conda-forge/noarch::ca-certificates-2025.6.15-hbd8a1cb_0 
  certifi            pkgs/main/linux-64::certifi-2025.4.26~ --> conda-forge/noarch::certifi-2025.6.15-pyhd8ed1ab_0 


Proceed ([y]/n)? y


Downloading and Extracting Packages:
                                                                                                                                                              
Preparing transaction: done                                                                                                                                   
Verifying transaction: done                                                                                                                                   
Executing transaction: done 

# 生效配置
(base) hooper@python60:~> source .bashrc

conda常用命令

# 创建虚拟环境
conda create -n <virtual_name> [python=<version>] [package1]
conda create -p <path/to/path/virtual_path> [python=<version>] [package1]

# 激活虚拟环境
conda activate <virtual_name>|<path/to/path/virtual_path>

# 退出当前虚拟环境
conda deactivate

# 查看虚拟环境列表
conda env list

# 删除执行虚拟环境
conda remove -n <virtual_name>|-p <path/to/path/virtual_path> --all

# 导出并保存虚拟环境
conda env export > environment.yaml

# 导入保存的虚拟环境
conda env create -f environment.yaml

# 查看通过conda安装的软件
conda list

部署JupyterLab环境

部署JupyterLab

# 创建虚拟环境
(base) hooper@python60:~> conda create -n learn_llm python=3.12
# Channels:
#  - defaults
# Platform: linux-64
# Collecting package metadata (repodata.json): done
# Solving environment: done

# ## Package Plan ##

#   environment location: /home/hooper/.conda/envs/learn_llm

#   added / updated specs:
#     - python=3.12


# The following packages will be downloaded:

#     package                    |            build
#     ---------------------------|-----------------
#     python-3.12.11             |       h22baa00_0        34.6 MB
#     setuptools-78.1.1          |  py312h06a4308_0         2.2 MB
#     wheel-0.45.1               |  py312h06a4308_0         147 KB
#     ------------------------------------------------------------
#                                            Total:        36.9 MB

# The following NEW packages will be INSTALLED:

#   _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main 
#   _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu 
#   bzip2              pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 
#   ca-certificates    pkgs/main/linux-64::ca-certificates-2025.2.25-h06a4308_0 
#   expat              pkgs/main/linux-64::expat-2.7.1-h6a678d5_0 
#   ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.40-h12ee557_0 
#   libffi             pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 
#   libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 
#   libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 
#   libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 
#   libuuid            pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 
#   libxcb             pkgs/main/linux-64::libxcb-1.17.0-h9b100fa_0 
#   ncurses            pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 
#   openssl            pkgs/main/linux-64::openssl-3.0.16-h5eee18b_0 
#   pip                pkgs/main/noarch::pip-25.1-pyhc872135_2 
#   pthread-stubs      pkgs/main/linux-64::pthread-stubs-0.3-h0ce48e5_1 
#   python             pkgs/main/linux-64::python-3.12.11-h22baa00_0 
#   readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0 
#   setuptools         pkgs/main/linux-64::setuptools-78.1.1-py312h06a4308_0 
#   sqlite             pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 
#   tk                 pkgs/main/linux-64::tk-8.6.14-h993c535_1 
#   tzdata             pkgs/main/noarch::tzdata-2025b-h04d1e81_0 
#   wheel              pkgs/main/linux-64::wheel-0.45.1-py312h06a4308_0 
#   xorg-libx11        pkgs/main/linux-64::xorg-libx11-1.8.12-h9b100fa_1 
#   xorg-libxau        pkgs/main/linux-64::xorg-libxau-1.0.12-h9b100fa_0 
#   xorg-libxdmcp      pkgs/main/linux-64::xorg-libxdmcp-1.1.5-h9b100fa_0 
#   xorg-xorgproto     pkgs/main/linux-64::xorg-xorgproto-2024.1-h5eee18b_1 
#   xz                 pkgs/main/linux-64::xz-5.6.4-h5eee18b_1 
#   zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 


# Proceed ([y]/n)? y


# Downloading and Extracting Packages:
                                                                                                                                                              
# Preparing transaction: done                                                                                                                                   
# Verifying transaction: done                                                                                                                                   
# Executing transaction: done
# #
# # To activate this environment, use
# #
# #     $ conda activate learn_llm
# #
# # To deactivate an active environment, use
# #
# #     $ conda deactivate

# 激活虚拟环境并验证
(base) hooper@python60:~> conda activate learn_llm
(learn_llm) hooper@python60:~> conda env list

# # conda environments:
# #
# learn_llm            * /home/hooper/.conda/envs/learn_llm
# base                   /usr/local/miniconda3

# 通过pip安装jupyterlab
(learn_llm) hooper@python60:~> pip install jupyterlab jupyterlab-language-pack-zh-CN jupyter
# Collecting jupyterlab
#   Downloading jupyterlab-4.4.4-py3-none-any.whl.metadata (16 kB)
# Collecting jupyterlab-language-pack-zh-CN
#   Downloading jupyterlab_language_pack_zh_cn-4.4.post0-py2.py3-none-any.whl.metadata (2.8 kB)
# Collecting jupyter
#   Downloading jupyter-1.1.1-py2.py3-none-any.whl.metadata (2.0 kB)
# Collecting async-lru>=1.0.0 (from jupyterlab)
#   Downloading async_lru-2.0.5-py3-none-any.whl.metadata (4.5 kB)
# Collecting httpx>=0.25.0 (from jupyterlab)
#   Downloading httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB)
# Collecting ipykernel>=6.5.0 (from jupyterlab)
#   Downloading ipykernel-6.29.5-py3-none-any.whl.metadata (6.3 kB)
# Collecting jinja2>=3.0.3 (from jupyterlab)
#   Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
# Collecting jupyter-core (from jupyterlab)
#   Downloading jupyter_core-5.8.1-py3-none-any.whl.metadata (1.6 kB)
# Collecting jupyter-lsp>=2.0.0 (from jupyterlab)
#   Downloading jupyter_lsp-2.2.5-py3-none-any.whl.metadata (1.8 kB)
# Collecting jupyter-server<3,>=2.4.0 (from jupyterlab)
#   Downloading jupyter_server-2.16.0-py3-none-any.whl.metadata (8.5 kB)
# Collecting jupyterlab-server<3,>=2.27.1 (from jupyterlab)
#   Downloading jupyterlab_server-2.27.3-py3-none-any.whl.metadata (5.9 kB)
# Collecting notebook-shim>=0.2 (from jupyterlab)
#   Downloading notebook_shim-0.2.4-py3-none-any.whl.metadata (4.0 kB)
# Collecting packaging (from jupyterlab)
#   Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
# Requirement already satisfied: setuptools>=41.1.0 in ./.conda/envs/learn_llm/lib/python3.12/site-packages (from jupyterlab) (78.1.1)
# Collecting tornado>=6.2.0 (from jupyterlab)
#   Downloading tornado-6.5.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.8 kB)
# Collecting traitlets (from jupyterlab)
#   Downloading traitlets-5.14.3-py3-none-any.whl.metadata (10 kB)
# Collecting anyio>=3.1.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading anyio-4.9.0-py3-none-any.whl.metadata (4.7 kB)
# Collecting argon2-cffi>=21.1 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading argon2_cffi-25.1.0-py3-none-any.whl.metadata (4.1 kB)
# Collecting jupyter-client>=7.4.4 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading jupyter_client-8.6.3-py3-none-any.whl.metadata (8.3 kB)
# Collecting jupyter-events>=0.11.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading jupyter_events-0.12.0-py3-none-any.whl.metadata (5.8 kB)
# Collecting jupyter-server-terminals>=0.4.4 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading jupyter_server_terminals-0.5.3-py3-none-any.whl.metadata (5.6 kB)
# Collecting nbconvert>=6.4.4 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading nbconvert-7.16.6-py3-none-any.whl.metadata (8.5 kB)
# Collecting nbformat>=5.3.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading nbformat-5.10.4-py3-none-any.whl.metadata (3.6 kB)
# Collecting overrides>=5.0 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading overrides-7.7.0-py3-none-any.whl.metadata (5.8 kB)
# Collecting prometheus-client>=0.9 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading prometheus_client-0.22.1-py3-none-any.whl.metadata (1.9 kB)
# Collecting pyzmq>=24 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading pyzmq-27.0.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (6.0 kB)
# Collecting send2trash>=1.8.2 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading Send2Trash-1.8.3-py3-none-any.whl.metadata (4.0 kB)
# Collecting terminado>=0.8.3 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading terminado-0.18.1-py3-none-any.whl.metadata (5.8 kB)
# Collecting websocket-client>=1.7 (from jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading websocket_client-1.8.0-py3-none-any.whl.metadata (8.0 kB)
# Collecting babel>=2.10 (from jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading babel-2.17.0-py3-none-any.whl.metadata (2.0 kB)
# Collecting json5>=0.9.0 (from jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading json5-0.12.0-py3-none-any.whl.metadata (36 kB)
# Collecting jsonschema>=4.18.0 (from jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading jsonschema-4.24.0-py3-none-any.whl.metadata (7.8 kB)
# Collecting requests>=2.31 (from jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading requests-2.32.4-py3-none-any.whl.metadata (4.9 kB)
# Collecting notebook (from jupyter)
#   Downloading notebook-7.4.4-py3-none-any.whl.metadata (10 kB)
# Collecting jupyter-console (from jupyter)
#   Downloading jupyter_console-6.6.3-py3-none-any.whl.metadata (5.8 kB)
# Collecting ipywidgets (from jupyter)
#   Downloading ipywidgets-8.1.7-py3-none-any.whl.metadata (2.4 kB)
# Collecting idna>=2.8 (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)
# Collecting sniffio>=1.1 (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
# Collecting typing_extensions>=4.5 (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading typing_extensions-4.14.1-py3-none-any.whl.metadata (3.0 kB)
# Collecting argon2-cffi-bindings (from argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)
# Collecting certifi (from httpx>=0.25.0->jupyterlab)
#   Downloading certifi-2025.6.15-py3-none-any.whl.metadata (2.4 kB)
# Collecting httpcore==1.* (from httpx>=0.25.0->jupyterlab)
#   Downloading httpcore-1.0.9-py3-none-any.whl.metadata (21 kB)
# Collecting h11>=0.16 (from httpcore==1.*->httpx>=0.25.0->jupyterlab)
#   Downloading h11-0.16.0-py3-none-any.whl.metadata (8.3 kB)
# Collecting comm>=0.1.1 (from ipykernel>=6.5.0->jupyterlab)
#   Downloading comm-0.2.2-py3-none-any.whl.metadata (3.7 kB)
# Collecting debugpy>=1.6.5 (from ipykernel>=6.5.0->jupyterlab)
#   Downloading debugpy-1.8.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.3 kB)
# Collecting ipython>=7.23.1 (from ipykernel>=6.5.0->jupyterlab)
#   Downloading ipython-9.4.0-py3-none-any.whl.metadata (4.4 kB)
# Collecting matplotlib-inline>=0.1 (from ipykernel>=6.5.0->jupyterlab)
#   Downloading matplotlib_inline-0.1.7-py3-none-any.whl.metadata (3.9 kB)
# Collecting nest-asyncio (from ipykernel>=6.5.0->jupyterlab)
#   Downloading nest_asyncio-1.6.0-py3-none-any.whl.metadata (2.8 kB)
# Collecting psutil (from ipykernel>=6.5.0->jupyterlab)
#   Downloading psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (22 kB)
# Collecting decorator (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading decorator-5.2.1-py3-none-any.whl.metadata (3.9 kB)
# Collecting ipython-pygments-lexers (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading ipython_pygments_lexers-1.1.1-py3-none-any.whl.metadata (1.1 kB)
# Collecting jedi>=0.16 (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading jedi-0.19.2-py2.py3-none-any.whl.metadata (22 kB)
# Collecting pexpect>4.3 (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading pexpect-4.9.0-py2.py3-none-any.whl.metadata (2.5 kB)
# Collecting prompt_toolkit<3.1.0,>=3.0.41 (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading prompt_toolkit-3.0.51-py3-none-any.whl.metadata (6.4 kB)
# Collecting pygments>=2.4.0 (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading pygments-2.19.2-py3-none-any.whl.metadata (2.5 kB)
# Collecting stack_data (from ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading stack_data-0.6.3-py3-none-any.whl.metadata (18 kB)
# Collecting wcwidth (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB)
# Collecting parso<0.9.0,>=0.8.4 (from jedi>=0.16->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading parso-0.8.4-py2.py3-none-any.whl.metadata (7.7 kB)
# Collecting MarkupSafe>=2.0 (from jinja2>=3.0.3->jupyterlab)
#   Downloading MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
# Collecting attrs>=22.2.0 (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading attrs-25.3.0-py3-none-any.whl.metadata (10 kB)
# Collecting jsonschema-specifications>=2023.03.6 (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading jsonschema_specifications-2025.4.1-py3-none-any.whl.metadata (2.9 kB)
# Collecting referencing>=0.28.4 (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading referencing-0.36.2-py3-none-any.whl.metadata (2.8 kB)
# Collecting rpds-py>=0.7.1 (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading rpds_py-0.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB)
# Collecting python-dateutil>=2.8.2 (from jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
# Collecting platformdirs>=2.5 (from jupyter-core->jupyterlab)
#   Downloading platformdirs-4.3.8-py3-none-any.whl.metadata (12 kB)
# Collecting python-json-logger>=2.0.4 (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading python_json_logger-3.3.0-py3-none-any.whl.metadata (4.0 kB)
# Collecting pyyaml>=5.3 (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
# Collecting rfc3339-validator (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading rfc3339_validator-0.1.4-py2.py3-none-any.whl.metadata (1.5 kB)
# Collecting rfc3986-validator>=0.1.1 (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading rfc3986_validator-0.1.1-py2.py3-none-any.whl.metadata (1.7 kB)
# Collecting fqdn (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading fqdn-1.5.1-py3-none-any.whl.metadata (1.4 kB)
# Collecting isoduration (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading isoduration-20.11.0-py3-none-any.whl.metadata (5.7 kB)
# Collecting jsonpointer>1.13 (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading jsonpointer-3.0.0-py2.py3-none-any.whl.metadata (2.3 kB)
# Collecting uri-template (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading uri_template-1.3.0-py3-none-any.whl.metadata (8.8 kB)
# Collecting webcolors>=24.6.0 (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading webcolors-24.11.1-py3-none-any.whl.metadata (2.2 kB)
# Collecting beautifulsoup4 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading beautifulsoup4-4.13.4-py3-none-any.whl.metadata (3.8 kB)
# Collecting bleach!=5.0.0 (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading bleach-6.2.0-py3-none-any.whl.metadata (30 kB)
# Collecting defusedxml (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading defusedxml-0.7.1-py2.py3-none-any.whl.metadata (32 kB)
# Collecting jupyterlab-pygments (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading jupyterlab_pygments-0.3.0-py3-none-any.whl.metadata (4.4 kB)
# Collecting mistune<4,>=2.0.3 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading mistune-3.1.3-py3-none-any.whl.metadata (1.8 kB)
# Collecting nbclient>=0.5.0 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading nbclient-0.10.2-py3-none-any.whl.metadata (8.3 kB)
# Collecting pandocfilters>=1.4.1 (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading pandocfilters-1.5.1-py2.py3-none-any.whl.metadata (9.0 kB)
# Collecting webencodings (from bleach!=5.0.0->bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading webencodings-0.5.1-py2.py3-none-any.whl.metadata (2.1 kB)
# Collecting tinycss2<1.5,>=1.1.0 (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading tinycss2-1.4.0-py3-none-any.whl.metadata (3.0 kB)
# Collecting fastjsonschema>=2.15 (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading fastjsonschema-2.21.1-py3-none-any.whl.metadata (2.2 kB)
# Collecting ptyprocess>=0.5 (from pexpect>4.3->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading ptyprocess-0.7.0-py2.py3-none-any.whl.metadata (1.3 kB)
# Collecting six>=1.5 (from python-dateutil>=2.8.2->jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
# Collecting charset_normalizer<4,>=2 (from requests>=2.31->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (35 kB)
# Collecting urllib3<3,>=1.21.1 (from requests>=2.31->jupyterlab-server<3,>=2.27.1->jupyterlab)
#   Downloading urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB)
# Collecting cffi>=1.0.1 (from argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
# Collecting pycparser (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
# Collecting soupsieve>1.2 (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading soupsieve-2.7-py3-none-any.whl.metadata (4.6 kB)
# Collecting widgetsnbextension~=4.0.14 (from ipywidgets->jupyter)
#   Downloading widgetsnbextension-4.0.14-py3-none-any.whl.metadata (1.6 kB)
# Collecting jupyterlab_widgets~=3.0.15 (from ipywidgets->jupyter)
#   Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl.metadata (20 kB)
# Collecting arrow>=0.15.0 (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading arrow-1.3.0-py3-none-any.whl.metadata (7.5 kB)
# Collecting types-python-dateutil>=2.8.10 (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab)
#   Downloading types_python_dateutil-2.9.0.20250516-py3-none-any.whl.metadata (2.1 kB)
# Collecting executing>=1.2.0 (from stack_data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading executing-2.2.0-py2.py3-none-any.whl.metadata (8.9 kB)
# Collecting asttokens>=2.1.0 (from stack_data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading asttokens-3.0.0-py3-none-any.whl.metadata (4.7 kB)
# Collecting pure-eval (from stack_data->ipython>=7.23.1->ipykernel>=6.5.0->jupyterlab)
#   Downloading pure_eval-0.2.3-py3-none-any.whl.metadata (6.3 kB)
# Downloading jupyterlab-4.4.4-py3-none-any.whl (12.3 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 1.6 MB/s eta 0:00:00
# Downloading jupyter_server-2.16.0-py3-none-any.whl (386 kB)
# Downloading jupyterlab_server-2.27.3-py3-none-any.whl (59 kB)
# Downloading jupyterlab_language_pack_zh_cn-4.4.post0-py2.py3-none-any.whl (209 kB)
# Downloading jupyter-1.1.1-py2.py3-none-any.whl (2.7 kB)
# Downloading anyio-4.9.0-py3-none-any.whl (100 kB)
# Downloading argon2_cffi-25.1.0-py3-none-any.whl (14 kB)
# Downloading async_lru-2.0.5-py3-none-any.whl (6.1 kB)
# Downloading babel-2.17.0-py3-none-any.whl (10.2 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 1.5 MB/s eta 0:00:00
# Downloading httpx-0.28.1-py3-none-any.whl (73 kB)
# Downloading httpcore-1.0.9-py3-none-any.whl (78 kB)
# Downloading h11-0.16.0-py3-none-any.whl (37 kB)
# Downloading idna-3.10-py3-none-any.whl (70 kB)
# Downloading ipykernel-6.29.5-py3-none-any.whl (117 kB)
# Downloading comm-0.2.2-py3-none-any.whl (7.2 kB)
# Downloading debugpy-1.8.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 2.0 MB/s eta 0:00:00
# Downloading ipython-9.4.0-py3-none-any.whl (611 kB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 611.0/611.0 kB 1.4 MB/s eta 0:00:00
# Downloading prompt_toolkit-3.0.51-py3-none-any.whl (387 kB)
# Downloading jedi-0.19.2-py2.py3-none-any.whl (1.6 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 1.2 MB/s eta 0:00:00
# Downloading parso-0.8.4-py2.py3-none-any.whl (103 kB)
# Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)
# Downloading json5-0.12.0-py3-none-any.whl (36 kB)
# Downloading jsonschema-4.24.0-py3-none-any.whl (88 kB)
# Downloading attrs-25.3.0-py3-none-any.whl (63 kB)
# Downloading jsonschema_specifications-2025.4.1-py3-none-any.whl (18 kB)
# Downloading jupyter_client-8.6.3-py3-none-any.whl (106 kB)
# Downloading jupyter_core-5.8.1-py3-none-any.whl (28 kB)
# Downloading jupyter_events-0.12.0-py3-none-any.whl (19 kB)
# Downloading jsonpointer-3.0.0-py2.py3-none-any.whl (7.6 kB)
# Downloading jupyter_lsp-2.2.5-py3-none-any.whl (69 kB)
# Downloading jupyter_server_terminals-0.5.3-py3-none-any.whl (13 kB)
# Downloading MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23 kB)
# Downloading matplotlib_inline-0.1.7-py3-none-any.whl (9.9 kB)
# Downloading nbconvert-7.16.6-py3-none-any.whl (258 kB)
# Downloading mistune-3.1.3-py3-none-any.whl (53 kB)
# Downloading bleach-6.2.0-py3-none-any.whl (163 kB)
# Downloading tinycss2-1.4.0-py3-none-any.whl (26 kB)
# Downloading nbclient-0.10.2-py3-none-any.whl (25 kB)
# Downloading nbformat-5.10.4-py3-none-any.whl (78 kB)
# Downloading fastjsonschema-2.21.1-py3-none-any.whl (23 kB)
# Downloading notebook_shim-0.2.4-py3-none-any.whl (13 kB)
# Downloading overrides-7.7.0-py3-none-any.whl (17 kB)
# Downloading packaging-25.0-py3-none-any.whl (66 kB)
# Downloading pandocfilters-1.5.1-py2.py3-none-any.whl (8.7 kB)
# Downloading pexpect-4.9.0-py2.py3-none-any.whl (63 kB)
# Downloading platformdirs-4.3.8-py3-none-any.whl (18 kB)
# Downloading prometheus_client-0.22.1-py3-none-any.whl (58 kB)
# Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
# Downloading pygments-2.19.2-py3-none-any.whl (1.2 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.7 MB/s eta 0:00:00
# Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
# Downloading python_json_logger-3.3.0-py3-none-any.whl (15 kB)
# Downloading PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (767 kB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 767.5/767.5 kB 1.4 MB/s eta 0:00:00
# Downloading pyzmq-27.0.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (839 kB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 839.8/839.8 kB 1.2 MB/s eta 0:00:00
# Downloading referencing-0.36.2-py3-none-any.whl (26 kB)
# Downloading requests-2.32.4-py3-none-any.whl (64 kB)
# Downloading charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (148 kB)
# Downloading urllib3-2.5.0-py3-none-any.whl (129 kB)
# Downloading certifi-2025.6.15-py3-none-any.whl (157 kB)
# Downloading rfc3986_validator-0.1.1-py2.py3-none-any.whl (4.2 kB)
# Downloading rpds_py-0.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (386 kB)
# Downloading Send2Trash-1.8.3-py3-none-any.whl (18 kB)
# Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)
# Downloading sniffio-1.3.1-py3-none-any.whl (10 kB)
# Downloading terminado-0.18.1-py3-none-any.whl (14 kB)
# Downloading tornado-6.5.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
# Downloading traitlets-5.14.3-py3-none-any.whl (85 kB)
# Downloading typing_extensions-4.14.1-py3-none-any.whl (43 kB)
# Downloading webcolors-24.11.1-py3-none-any.whl (14 kB)
# Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
# Downloading websocket_client-1.8.0-py3-none-any.whl (58 kB)
# Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
# Downloading cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (479 kB)
# Downloading beautifulsoup4-4.13.4-py3-none-any.whl (187 kB)
# Downloading soupsieve-2.7-py3-none-any.whl (36 kB)
# Downloading decorator-5.2.1-py3-none-any.whl (9.2 kB)
# Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
# Downloading fqdn-1.5.1-py3-none-any.whl (9.1 kB)
# Downloading ipython_pygments_lexers-1.1.1-py3-none-any.whl (8.1 kB)
# Downloading ipywidgets-8.1.7-py3-none-any.whl (139 kB)
# Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl (216 kB)
# Downloading widgetsnbextension-4.0.14-py3-none-any.whl (2.2 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 1.6 MB/s eta 0:00:00
# Downloading isoduration-20.11.0-py3-none-any.whl (11 kB)
# Downloading arrow-1.3.0-py3-none-any.whl (66 kB)
# Downloading types_python_dateutil-2.9.0.20250516-py3-none-any.whl (14 kB)
# Downloading jupyter_console-6.6.3-py3-none-any.whl (24 kB)
# Downloading jupyterlab_pygments-0.3.0-py3-none-any.whl (15 kB)
# Downloading nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB)
# Downloading notebook-7.4.4-py3-none-any.whl (14.3 MB)
#    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.3/14.3 MB 1.6 MB/s eta 0:00:00
# Downloading psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (277 kB)
# Downloading pycparser-2.22-py3-none-any.whl (117 kB)
# Downloading rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB)
# Downloading stack_data-0.6.3-py3-none-any.whl (24 kB)
# Downloading asttokens-3.0.0-py3-none-any.whl (26 kB)
# Downloading executing-2.2.0-py2.py3-none-any.whl (26 kB)
# Downloading pure_eval-0.2.3-py3-none-any.whl (11 kB)
# Downloading uri_template-1.3.0-py3-none-any.whl (11 kB)
# Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
# Installing collected packages: webencodings, wcwidth, pure-eval, ptyprocess, jupyterlab-language-pack-zh-CN, fastjsonschema, widgetsnbextension, websocket-client, webcolors, urllib3, uri-template, typing_extensions, types-python-dateutil, traitlets, tornado, tinycss2, soupsieve, sniffio, six, send2trash, rpds-py, rfc3986-validator, pyzmq, pyyaml, python-json-logger, pygments, pycparser, psutil, prompt_toolkit, prometheus-client, platformdirs, pexpect, parso, pandocfilters, packaging, overrides, nest-asyncio, mistune, MarkupSafe, jupyterlab_widgets, jupyterlab-pygments, jsonpointer, json5, idna, h11, fqdn, executing, defusedxml, decorator, debugpy, charset_normalizer, certifi, bleach, babel, attrs, async-lru, asttokens, terminado, stack_data, rfc3339-validator, requests, referencing, python-dateutil, matplotlib-inline, jupyter-core, jinja2, jedi, ipython-pygments-lexers, httpcore, comm, cffi, beautifulsoup4, anyio, jupyter-server-terminals, jupyter-client, jsonschema-specifications, ipython, httpx, arrow, argon2-cffi-bindings, jsonschema, isoduration, ipywidgets, ipykernel, argon2-cffi, nbformat, jupyter-console, nbclient, jupyter-events, nbconvert, jupyter-server, notebook-shim, jupyterlab-server, jupyter-lsp, jupyterlab, notebook, jupyter
# Successfully installed MarkupSafe-3.0.2 anyio-4.9.0 argon2-cffi-25.1.0 argon2-cffi-bindings-21.2.0 arrow-1.3.0 asttokens-3.0.0 async-lru-2.0.5 attrs-25.3.0 babel-2.17.0 beautifulsoup4-4.13.4 bleach-6.2.0 certifi-2025.6.15 cffi-1.17.1 charset_normalizer-3.4.2 comm-0.2.2 debugpy-1.8.14 decorator-5.2.1 defusedxml-0.7.1 executing-2.2.0 fastjsonschema-2.21.1 fqdn-1.5.1 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 idna-3.10 ipykernel-6.29.5 ipython-9.4.0 ipython-pygments-lexers-1.1.1 ipywidgets-8.1.7 isoduration-20.11.0 jedi-0.19.2 jinja2-3.1.6 json5-0.12.0 jsonpointer-3.0.0 jsonschema-4.24.0 jsonschema-specifications-2025.4.1 jupyter-1.1.1 jupyter-client-8.6.3 jupyter-console-6.6.3 jupyter-core-5.8.1 jupyter-events-0.12.0 jupyter-lsp-2.2.5 jupyter-server-2.16.0 jupyter-server-terminals-0.5.3 jupyterlab-4.4.4 jupyterlab-language-pack-zh-CN-4.4.post0 jupyterlab-pygments-0.3.0 jupyterlab-server-2.27.3 jupyterlab_widgets-3.0.15 matplotlib-inline-0.1.7 mistune-3.1.3 nbclient-0.10.2 nbconvert-7.16.6 nbformat-5.10.4 nest-asyncio-1.6.0 notebook-7.4.4 notebook-shim-0.2.4 overrides-7.7.0 packaging-25.0 pandocfilters-1.5.1 parso-0.8.4 pexpect-4.9.0 platformdirs-4.3.8 prometheus-client-0.22.1 prompt_toolkit-3.0.51 psutil-7.0.0 ptyprocess-0.7.0 pure-eval-0.2.3 pycparser-2.22 pygments-2.19.2 python-dateutil-2.9.0.post0 python-json-logger-3.3.0 pyyaml-6.0.2 pyzmq-27.0.0 referencing-0.36.2 requests-2.32.4 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rpds-py-0.26.0 send2trash-1.8.3 six-1.17.0 sniffio-1.3.1 soupsieve-2.7 stack_data-0.6.3 terminado-0.18.1 tinycss2-1.4.0 tornado-6.5.1 traitlets-5.14.3 types-python-dateutil-2.9.0.20250516 typing_extensions-4.14.1 uri-template-1.3.0 urllib3-2.5.0 wcwidth-0.2.13 webcolors-24.11.1 webencodings-0.5.1 websocket-client-1.8.0 widgetsnbextension-4.0.14

# 验证
(learn_llm) hooper@python60:~> pip list|grep jupyter
# jupyter                        1.1.1
# jupyter_client                 8.6.3
# jupyter-console                6.6.3
# jupyter_core                   5.8.1
# jupyter-events                 0.12.0
# jupyter-lsp                    2.2.5
# jupyter_server                 2.16.0
# jupyter_server_terminals       0.5.3
# jupyterlab                     4.4.4
# jupyterlab-language-pack-zh-CN 4.4.post0
# jupyterlab_pygments            0.3.0
# jupyterlab_server              2.27.3
# jupyterlab_widgets             3.0.15

运行JupyterLab

# 创建jupyter笔记本的目录
(learn_llm) hooper@python60:~> mkdir /data/LLM-Ops/jupyter_note

# 生成配置文件
(learn_llm) hooper@python60:~> jupyter-lab --generate-config
Writing default config to: {config_file!r}
(learn_llm) hooper@python60:~> ls -lha|grep jupyter
drwx------  2 hooper users   35 Jul  7 11:32 .jupyter

# 修改jupyterlab执行的目录
(learn_llm) hooper@python60:~> cd .jupyter/
(learn_llm) hooper@python60:~/.jupyter> cp -rp jupyter_lab_config.py{,.`datebak`}
(learn_llm) hooper@python60:~/.jupyter> diff jupyter_lab_config.py jupyter_lab_config.py.2025-07-07_11-33-30 
# 911c911
# < c.ServerApp.ip = '0.0.0.0'
# ---
# > # c.ServerApp.ip = 'localhost'
# 1059c1059
# < c.ServerApp.root_dir = '/data/LLM-Ops'
# ---
# > # c.ServerApp.root_dir = ''

# 启动JupyterLab
(learn_llm) hooper@python60:~> jupyter-lab
# [I 2025-07-07 11:46:45.307 ServerApp] jupyter_lsp | extension was successfully linked.
# [I 2025-07-07 11:46:45.310 ServerApp] jupyter_server_terminals | extension was successfully linked.
# [I 2025-07-07 11:46:45.314 ServerApp] jupyterlab | extension was successfully linked.
# [I 2025-07-07 11:46:45.316 ServerApp] notebook | extension was successfully linked.
# [I 2025-07-07 11:46:45.455 ServerApp] notebook_shim | extension was successfully linked.
# [I 2025-07-07 11:46:45.464 ServerApp] notebook_shim | extension was successfully loaded.
# [I 2025-07-07 11:46:45.466 ServerApp] jupyter_lsp | extension was successfully loaded.
# [I 2025-07-07 11:46:45.467 ServerApp] jupyter_server_terminals | extension was successfully loaded.
# [I 2025-07-07 11:46:45.468 LabApp] JupyterLab extension loaded from /home/hooper/.conda/envs/learn_llm/lib/python3.12/site-packages/jupyterlab
# [I 2025-07-07 11:46:45.468 LabApp] JupyterLab application directory is /home/hooper/.conda/envs/learn_llm/share/jupyter/lab
# [I 2025-07-07 11:46:45.468 LabApp] Extension Manager is 'pypi'.
# [I 2025-07-07 11:46:45.502 ServerApp] jupyterlab | extension was successfully loaded.
# [I 2025-07-07 11:46:45.505 ServerApp] notebook | extension was successfully loaded.
# [I 2025-07-07 11:46:45.505 ServerApp] Serving notebooks from local directory: /data/LLM-Ops/jupyter_note
# [I 2025-07-07 11:46:45.505 ServerApp] Jupyter Server 2.16.0 is running at:
# [I 2025-07-07 11:46:45.505 ServerApp] http://python60:8888/lab?token=c57be21bb54f972e7e20b5accd0d7ac1544c7dfcb26b0e9a
# [I 2025-07-07 11:46:45.505 ServerApp]     http://127.0.0.1:8888/lab?token=c57be21bb54f972e7e20b5accd0d7ac1544c7dfcb26b0e9a
# [I 2025-07-07 11:46:45.505 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
# [C 2025-07-07 11:46:45.508 ServerApp] 
    
#     To access the server, open this file in a browser:
#         file:///home/hooper/.local/share/jupyter/runtime/jpserver-6801-open.html
#     Or copy and paste one of these URLs:
#         http://python60:8888/lab?token=c57be21bb54f972e7e20b5accd0d7ac1544c7dfcb26b0e9a
#         http://127.0.0.1:8888/lab?token=c57be21bb54f972e7e20b5accd0d7ac1544c7dfcb26b0e9a

# 验证
hooper@python60:/data/LLM-Ops> sudo ss -tnlp|grep 8888
# LISTEN    0         128                0.0.0.0:8888             0.0.0.0:*        users:(("jupyter-lab",pid=6801,fd=8)) 

# 直接启动命令
# jupyter-lab --ip=0.0.0.0 --allow-root --notebook-dir="</path/to/path/jupyter_note_path>" --preferred-dir="</path/to/path/jupyter_preferred_path>"
# --notebook-dir: 设置文件系统根目录(影响文件浏览器可见范围)
# --preferred-dir: 执行启动后默认打开目录
# --allow-root: 如果是root用户启动,需要开启root用户允许

JupyterLab使用指南

浏览器输入jupyter-lab地址 —> 输入token进入

在这里插入图片描述

创建.ipynb文件并输入相关内容 —> 保存.ipynb文件

在这里插入图片描述
在这里插入图片描述

关于Jupyter Lab单元格相关操作说明
在这里插入图片描述

部署NumPy模块

部署NumPy

# 切换至虚拟环境
(base) hooper@python60:~> conda env list

# # conda environments:
# #
# learn_llm              /home/hooper/.conda/envs/learn_llm
# base                 * /usr/local/miniconda3

(base) hooper@python60:~> conda activate learn_llm 

# 设置全局pip国内镜像源
(learn_llm) hooper@python60:~> pip config list
(learn_llm) hooper@python60:~> pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to /home/hooper/.config/pip/pip.conf
(learn_llm) hooper@python60:~> pip config list
global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'

# 指定国内源pip安装
(learn_llm) hooper@python60:~> pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

# pip安装numpy
(learn_llm) hooper@python60:~> pip install numpy
# Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
# Collecting numpy
#   Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6e/45/c51cb248e679a6c6ab14b7a8e3ead3f4a3fe7425fc7a6f98b3f147bec532/numpy-2.3.1-cp312-cp312-manylinux_2_28_x86_64.whl (16.6 MB)
#      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 986.6 kB/s eta 0:00:00
# Installing collected packages: numpy
# Successfully installed numpy-2.3.1
(learn_llm) hooper@python60:~> pip list|grep numpy
numpy                          2.3.1

NumPy的使用

# 安装numpy: pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
import numpy as np

list_info = [[1, 2, 3], [40, 50, 60], [700, 800, 900]]
tuple_info = (700, 800, 900)


def array_info(ori_arr):
    # 1. Numpy创建数组练习
    # 创建数组
    arr = np.array(ori_arr)
    info_msg = f"""
    通过Numpy创建的数组:
    {arr}
    数组维度:{arr.ndim}
    数组维度大小:{arr.shape}
    数组元素个数:{arr.size}
    数组元素类型:{arr.dtype}
    数组每个元素字节数:{arr.itemsize}
    数组转置:
    {arr.T}
    """
    print(info_msg)


array_info(list_info)
array_info(tuple_info)

# 矩阵的维度
age_list = [18, 22, 28]

arr_1_d = np.array(age_list)
arr_2_d = np.array(age_list, ndmin=2)
print(f"""
一维age_arr的信息:{arr_1_d},维度:{arr_1_d.ndim},维度大小:{arr_1_d.shape},数组元素个数:{arr_1_d.size}
二维age_arr2的信息:{arr_2_d},维度:{arr_2_d.ndim},维度大小:{arr_2_d.shape},数组元素个数:{arr_2_d.size}
      """)

# 2. 矩阵复制练习

copy_list = [1, 2, 3]
arr_ori = np.array(copy_list)
arr_create_copyT = np.array(arr_ori, copy=True)
arr_create_copyF = np.array(arr_ori, copy=False)
arr_copy = arr_ori.copy()
arr_create_copyT[0] = 100
arr_create_copyF[0] = 200
arr_copy[0] = 300
print(f"""
      copy_list:{copy_list},id:{id(copy_list)}
      arr_ori:{arr_ori},id:{id(arr_ori)}
      arr_create_copyT:{arr_create_copyT},id:{id(arr_create_copyT)}
      arr_create_copyF:{arr_create_copyF},id:{id(arr_create_copyF)}
      arr_copy:{arr_copy},id:{id(arr_copy)}
      """)


# 3. 矩阵运算及广播练习
A = [[1, 2], [3, 4], [4, 6]]
B = [[7, 8], [9, 10], [11, 12]]
# 初始化矩阵加法的空列表
C = [[0 for _ in range(2)] for _ in range(3)]
D = [[7, 8, 9], [10, 11, 12]]
# 初始化矩阵乘法的空列表
E = [[0 for _ in range(3)] for _ in range(3)]

# 打印列表
print(f"初始化A: {A}")
print(f"初始化B: {B}")
print(f"初始化D: {D}")

# Python原生矩阵运算示例
print("--- 3.0. Python矩阵运算示例-加法 ---")
for i in range(3):   # 遍历行
    for j in range(2):   # 遍历列
        C[i][j] = A[i][j] + B[i][j]
print("通过Python的循环进行的矩阵A + 矩阵B 的结果: ")
for row in C:
    print(row)

print("--- 3.0. Python矩阵运算示例- 乘法(点积) ---")
# 矩阵乘法运算示例,矩阵乘法要求A的列数要等于B的行数,结果矩阵的行数量等于A的行数,列数量等于B的列数
# 定义3x2矩阵和2x3矩阵
for i in range(3):   # 遍历第一个矩阵的行
    for j in range(3):   # 遍历第二个矩阵的列
        for k in range(2):   # 遍历第一个矩阵的列(或第二个矩阵的行)
            E[i][j] += A[i][k] * D[k][j]
print("通过Python的循环进行的矩阵A X 矩阵D 的结果: ")
for row in E:
    print(row)

print("--- 华丽的分割线 ---")

# 创建numpy数组
arr_A = np.array(A)
arr_B = np.array(B)
arr_D = np.array(D)
# 初始化一个偏置向量(将在广播中使用)
# 假设用于 A @ D 的结果(3x3),偏置可以是 (3,) 或 (1, 3)
# bias = np.random.rand(3)  # Shape (3,)
bias = np.random.randint(low=1, high=5, size=(3,))  # Shape (3,)

print(f"\narr_A:\n{arr_A}")
print(f"\narr_B:\n{arr_B}")
print(f"\narr_D:\n{arr_D}")
print(f"\nbias:\n{bias}")

# --- 1. 矩阵乘法 (Dot Product) ---
# A (3x2) @ D (2x3) (前列 == 后行) 结果(前行后列)是 3x3
matmul_AD = arr_A @ arr_D
# 通过np.dot()
# matmul_AD = np.dot(arr_A, arr_D)
print("--- 3.1. 矩阵乘法 (arr_A @ arr_D) ---")
print(f"matmul_AD形状: {matmul_AD.shape}")
print(f"matmul_AD结果 (3x3):\n{matmul_AD}\n")
# D (2x3) @ A (3x2) (前列 == 后行) 结果(前行后列)是 2x2
matmul_DA = arr_D @ arr_A
# 或者使用 np.dot()
# matmul_DA = np.dot(arr_D, arr_A)
print("--- 3.1. 矩阵乘法 (arr_D @ arr_A) ---")
print(f"matmul_DA形状: {matmul_DA.shape}")
print(f"matmul_DA结果 (2x2):\n{matmul_DA}\n")

# --- 2. 元素加法 (Element-wise Addition) & 广播 ---
# 用于添加偏置、残差连接等
# 两个形状相同的矩阵相加
add_AB = arr_A + arr_B
print("--- 3.2. 元素加法 (arr_A + arr_B) ---")
print(f"形状: {add_AB.shape}")
print(f"结果 (3x2):\n{add_AB}\n")

# 广播示例:将偏置向量 bias 加到 matmul_AD (3x3) 的每一行
# bias (3,) 会被广播成 (1, 3),然后扩展到 (3, 3) 与 matmul_AD 相加
add_bias = matmul_AD + bias
print("--- 3.2. 元素加法 (广播) (arr_A @ arr_D + bias) ---")
print(f"add_bias形状: {add_bias.shape}")
print(f"add_bias结果 (3x3):\n{add_bias}\n")

# --- 3. 元素乘法 (Element-wise Multiplication / Hadamard Product) ---
# 用于门控机制、缩放等
# 两个形状相同的矩阵 arr_A 和 arr_B 进行元素乘法
elemwise_mul = arr_A * arr_B
print("--- 3.3. 元素乘法 (arr_A * arr_B) ---")
print(f"形状: {elemwise_mul.shape}")
print(f"结果 (3x2):\n{elemwise_mul}\n")

参考文献

JupyterLab 启动指南:从基础到进阶的全面解析
Ubuntu 安装 Miniconda 及配置国内镜像源完整指南

您可能感兴趣的与本文相关的镜像

Python3.9

Python3.9

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值