diff --git a/Python/QA-001-Cartopy-Installation-Jet.ipynb b/Python/QA-001-Cartopy-Installation-Jet.ipynb index 2445498b91e0f8b7090b6b8354e67fb9b593cd46..11f61f894c03c588583f17368f79980b1726c034 100644 --- a/Python/QA-001-Cartopy-Installation-Jet.ipynb +++ b/Python/QA-001-Cartopy-Installation-Jet.ipynb @@ -17,15 +17,17 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\n", - " 1) anaconda3/2021.05-gcc-8.5.0 3) proj/8.1.0-gcc-8.5.0 \n", - " 2) geos/3.8.1-gcc-8.5.0 \n" + " 1) micromamba/2.2.0 3) geos/3.12.0-gcc-12.2.0-fa7igw7 \n", + " 2) proj/9.2.1-gcc-12.2.0-bx4rp63 \n" ] } ], @@ -121,7 +123,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Overwriting /jetfs/home/mblaschek/load_modules_into_jupyter.conf\n" + "Overwriting /jetfs/home/yourusername/load_modules_into_jupyter.conf\n" ] } ], @@ -213,7 +215,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.0" + "version": "3.9.0" }, "vscode": { "interpreter": { diff --git a/Python/QA-002-Modules-loaded-Kernel.ipynb b/Python/QA-002-Modules-loaded-Kernel.ipynb index f80b8f830246c373b0c560fe1cac4937d6ce466f..ce4e681fc36dda28629738d16dea8970e8b28fcc 100644 --- a/Python/QA-002-Modules-loaded-Kernel.ipynb +++ b/Python/QA-002-Modules-loaded-Kernel.ipynb @@ -17,14 +17,16 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\n", - " 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n" + " 1) micromamba/2.2.0 \n" ] } ], @@ -46,31 +48,35 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Writing /jetfs/home/mblaschek/load_modules_into_jupyter.conf\n" + "Overwriting /jetfs/home/yourusername/load_modules_into_jupyter.conf\n" ] } ], "source": [ "%%writefile ~/load_modules_into_jupyter.conf\n", - "eccodes/2.18.0-gcc-8.3.1-s7clum3\n" + "eccodes/2.25.0-gcc-12.2.0-y2gnn47\n" ] }, { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "eccodes/2.18.0-gcc-8.3.1-s7clum3\n" + "eccodes/2.25.0-gcc-12.2.0-y2gnn47\n" ] } ], @@ -88,20 +94,18 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\n", - " 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n", - " 2) zlib/1.2.11-gcc-8.3.1-bbbpnzp \n", - " 3) openmpi/4.0.5-gcc-8.3.1-773ztsv \n", - " 4) hdf5/1.12.0-gcc-8.3.1-awl4atl \n", - " 5) parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn \n", - " 6) netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k \n", - " 7) eccodes/2.18.0-gcc-8.3.1-s7clum3 \n" + " 1) micromamba/2.2.0 4) netcdf-c/4.9.2-gcc-12.2.0-wicjkfm \n", + " 2) mpich/4.1.2-gcc-12.2.0-mzdfzqb 5) eccodes/2.25.0-gcc-12.2.0-y2gnn47 \n", + " 3) hdf5/1.10.10-gcc-12.2.0-cnot2wb \n" ] } ], @@ -119,7 +123,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Miniconda3 (4.8.2)", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -133,7 +137,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.1" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-003-Conda-Environment.ipynb b/Python/QA-003-Conda-Environment.ipynb index 0609dd41c7d72ec3a74cd3d5cad8fecd72e18e5c..add18ce22661ce8b8892d4fbd0a519d330d3da29 100644 --- a/Python/QA-003-Conda-Environment.ipynb +++ b/Python/QA-003-Conda-Environment.ipynb @@ -6,26 +6,35 @@ "source": [ "# Setting up a user environment\n", "\n", + "Please notice that since 2024, the University of Vienna allows using anaconda products (anaconda and miniconda distributions) **only for teaching**, no research.\n", + "Please use alternatives: [miniforge](https://github.com/conda-forge/miniforge), [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) (av. on all department servers), [mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) or [pip](https://packaging.python.org/en/latest/tutorials/installing-packages/) (av. on all department servers)\n", + "\n", "Topics\n", - "* Setup a user environment [using conda](#using-conda)\n", + "* Setup a user environment [using micromamba](#using-micromamba)\n", " - [Add user environment to notebook kernels](#add-the-new-environment-to-your-active-kernels)\n", - " - [Activate your conda environment](#activate-your-conda-environment)\n", + " - [Activate your environment](#activate-your-environment)\n", "* Setup a user environment [using venv](#using-virtual-environment)\n", - "* Include `PATH` in [Notebook Kernel](#add-path-to-your-user-environment)\n" + "* Include `PATH` in [Notebook Kernel](#add-path-to-your-user-environment)\n", + "\n", + "\n", + "Select the default kernel that should have `micromamba` present, otherwise add micromamba to the file `load_modules_into_jupyter.conf` or run `echo micromamba > ~/load_modules_into_jupyter.conf` in a terminal or in a code cell (prepending `!`).\n", + "\n", + "updated: 2025.06" ] }, { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\u001b[m\n", - " 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \u001b[m\n", - "\u001b[K\u001b[?1l\u001b>" + " 1) micromamba/2.2.0 \u001b[m" ] } ], @@ -43,181 +52,80 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", - " active environment : None\n", - " user config file : /jetfs/home/mblaschek/.condarc\n", - " populated config files : /jetfs/home/mblaschek/.condarc\n", - " conda version : 4.8.5\n", - " conda-build version : not installed\n", - " python version : 3.8.1.final.0\n", - " virtual packages : __glibc=2.28\n", - " base environment : /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv (read only)\n", - " channel URLs : https://repo.anaconda.com/pkgs/main/linux-64\n", - " https://repo.anaconda.com/pkgs/main/noarch\n", - " https://repo.anaconda.com/pkgs/r/linux-64\n", - " https://repo.anaconda.com/pkgs/r/noarch\n", - " package cache : /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/pkgs\n", - " /jetfs/home/mblaschek/.conda/pkgs\n", - " envs directories : /jetfs/home/mblaschek/.conda/envs\n", - " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/envs\n", - " platform : linux-64\n", - " user-agent : conda/4.8.5 requests/2.22.0 CPython/3.8.1 Linux/4.18.0-147.el8.x86_64 centos/8.2.2004 glibc/2.28\n", - " UID:GID : 54212:100\n", - " netrc file : None\n", - " offline mode : False\n", - "\n" + " libmamba version : 2.2.0\n", + " micromamba version : 2.2.0\n", + " curl version : libcurl/8.14.1 OpenSSL/3.5.0 zlib/1.3.1 zstd/1.5.7 libssh2/1.11.1 nghttp2/1.64.0\n", + " libarchive version : libarchive 3.7.7 zlib/1.3.1 bz2lib/1.0.8 libzstd/1.5.7\n", + " envs directories : /jetfs/home/yourusername/micromamba/envs\n", + " package cache : /jetfs/home/yourusername/micromamba/pkgs\n", + " /jetfs/home/yourusername/.mamba/pkgs\n", + " environment : base\n", + " env location : /jetfs/home/yourusername/micromamba\n", + " user config files : /jetfs/home/yourusername/.mambarc\n", + " populated config files : /jetfs/home/yourusername/.condarc\n", + " virtual packages : __unix=0=0\n", + " __linux=4.18.0=0\n", + " __glibc=2.28=0\n", + " __archspec=1=x86_64_v4\n", + " channels : https://conda.anaconda.org/conda-forge/linux-64\n", + " https://conda.anaconda.org/conda-forge/noarch\n", + " base environment : /jetfs/home/yourusername/micromamba\n", + " platform : linux-64\n" ] } ], "source": [ - "!conda info" + "!micromamba info" ] }, { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# Create a environment with conda\n", + "# use -q quiet\n", + "# -y yes to all questions\n", + "# -c [] use conda-forge FLOSS channel\n", + "# -n [] name of the environment\n", + "# add packages, e.g.: python at version 3.12 numpy an ipykernel (required for jupyter integration)\n", + "!micromamba create -q -y -c conda-forge -n myenv python=3.12 numpy ipykernel" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Collecting package metadata (current_repodata.json): done\n", - "Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.\n", - "Collecting package metadata (repodata.json): done\n", - "Solving environment: done\n", - "\n", - "\n", - "==> WARNING: A newer version of conda exists. <==\n", - " current version: 4.8.5\n", - " latest version: 4.9.2\n", - "\n", - "Please update conda by running\n", - "\n", - " $ conda update -n base -c defaults conda\n", - "\n", - "\n", - "\n", - "## Package Plan ##\n", - "\n", - " environment location: /jetfs/home/mblaschek/.conda/envs/myenv\n", - "\n", - " added / updated specs:\n", - " - ipykernel\n", - " - numpy\n", - " - python=3.7\n", - "\n", - "\n", - "The following packages will be downloaded:\n", - "\n", - " package | build\n", - " ---------------------------|-----------------\n", - " certifi-2020.11.8 | py37h06a4308_0 148 KB\n", - " ipython-7.19.0 | py37hb070fc8_0 978 KB\n", - " jupyter_core-4.7.0 | py37h06a4308_0 68 KB\n", - " numpy-1.19.2 | py37h54aff64_0 22 KB\n", - " numpy-base-1.19.2 | py37hfa32c7d_0 4.1 MB\n", - " pexpect-4.8.0 | pyhd3eb1b0_3 53 KB\n", - " pip-20.2.4 | py37h06a4308_0 1.7 MB\n", - " ptyprocess-0.6.0 | pyhd3eb1b0_2 20 KB\n", - " pygments-2.7.2 | pyhd3eb1b0_0 674 KB\n", - " setuptools-50.3.1 | py37h06a4308_1 711 KB\n", - " six-1.15.0 | py37h06a4308_0 27 KB\n", - " wheel-0.35.1 | pyhd3eb1b0_0 38 KB\n", - " ------------------------------------------------------------\n", - " Total: 8.5 MB\n", - "\n", - "The following NEW packages will be INSTALLED:\n", - "\n", - " _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main\n", - " backcall pkgs/main/noarch::backcall-0.2.0-py_0\n", - " blas pkgs/main/linux-64::blas-1.0-mkl\n", - " ca-certificates pkgs/main/linux-64::ca-certificates-2020.10.14-0\n", - " certifi pkgs/main/linux-64::certifi-2020.11.8-py37h06a4308_0\n", - " decorator pkgs/main/noarch::decorator-4.4.2-py_0\n", - " intel-openmp pkgs/main/linux-64::intel-openmp-2020.2-254\n", - " ipykernel pkgs/main/linux-64::ipykernel-5.3.4-py37h5ca1d4c_0\n", - " ipython pkgs/main/linux-64::ipython-7.19.0-py37hb070fc8_0\n", - " ipython_genutils pkgs/main/linux-64::ipython_genutils-0.2.0-py37_0\n", - " jedi pkgs/main/linux-64::jedi-0.17.2-py37_0\n", - " jupyter_client pkgs/main/noarch::jupyter_client-6.1.7-py_0\n", - " jupyter_core pkgs/main/linux-64::jupyter_core-4.7.0-py37h06a4308_0\n", - " ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7\n", - " libedit pkgs/main/linux-64::libedit-3.1.20191231-h14c3975_1\n", - " libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2\n", - " libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0\n", - " libsodium pkgs/main/linux-64::libsodium-1.0.18-h7b6447c_0\n", - " libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0\n", - " mkl pkgs/main/linux-64::mkl-2020.2-256\n", - " mkl-service pkgs/main/linux-64::mkl-service-2.3.0-py37he904b0f_0\n", - " mkl_fft pkgs/main/linux-64::mkl_fft-1.2.0-py37h23d657b_0\n", - " mkl_random pkgs/main/linux-64::mkl_random-1.1.1-py37h0573a6f_0\n", - " ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1\n", - " numpy pkgs/main/linux-64::numpy-1.19.2-py37h54aff64_0\n", - " numpy-base pkgs/main/linux-64::numpy-base-1.19.2-py37hfa32c7d_0\n", - " openssl pkgs/main/linux-64::openssl-1.1.1h-h7b6447c_0\n", - " parso pkgs/main/noarch::parso-0.7.0-py_0\n", - " pexpect pkgs/main/noarch::pexpect-4.8.0-pyhd3eb1b0_3\n", - " pickleshare pkgs/main/linux-64::pickleshare-0.7.5-py37_1001\n", - " pip pkgs/main/linux-64::pip-20.2.4-py37h06a4308_0\n", - " prompt-toolkit pkgs/main/noarch::prompt-toolkit-3.0.8-py_0\n", - " ptyprocess pkgs/main/noarch::ptyprocess-0.6.0-pyhd3eb1b0_2\n", - " pygments pkgs/main/noarch::pygments-2.7.2-pyhd3eb1b0_0\n", - " python pkgs/main/linux-64::python-3.7.9-h7579374_0\n", - " python-dateutil pkgs/main/noarch::python-dateutil-2.8.1-py_0\n", - " pyzmq pkgs/main/linux-64::pyzmq-19.0.2-py37he6710b0_1\n", - " readline pkgs/main/linux-64::readline-8.0-h7b6447c_0\n", - " setuptools pkgs/main/linux-64::setuptools-50.3.1-py37h06a4308_1\n", - " six pkgs/main/linux-64::six-1.15.0-py37h06a4308_0\n", - " sqlite pkgs/main/linux-64::sqlite-3.33.0-h62c20be_0\n", - " tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0\n", - " tornado pkgs/main/linux-64::tornado-6.0.4-py37h7b6447c_1\n", - " traitlets pkgs/main/noarch::traitlets-5.0.5-py_0\n", - " wcwidth pkgs/main/noarch::wcwidth-0.2.5-py_0\n", - " wheel pkgs/main/noarch::wheel-0.35.1-pyhd3eb1b0_0\n", - " xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0\n", - " zeromq pkgs/main/linux-64::zeromq-4.3.3-he6710b0_3\n", - " zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3\n", - "\n", - "\n", - "\n", - "Downloading and Extracting Packages\n", - "numpy-1.19.2 | 22 KB | ##################################### | 100% \n", - "pip-20.2.4 | 1.7 MB | ##################################### | 100% \n", - "numpy-base-1.19.2 | 4.1 MB | ##################################### | 100% \n", - "certifi-2020.11.8 | 148 KB | ##################################### | 100% \n", - "wheel-0.35.1 | 38 KB | ##################################### | 100% \n", - "ipython-7.19.0 | 978 KB | ##################################### | 100% \n", - "pexpect-4.8.0 | 53 KB | ##################################### | 100% \n", - "pygments-2.7.2 | 674 KB | ##################################### | 100% \n", - "ptyprocess-0.6.0 | 20 KB | ##################################### | 100% \n", - "jupyter_core-4.7.0 | 68 KB | ##################################### | 100% \n", - "setuptools-50.3.1 | 711 KB | ##################################### | 100% \n", - "six-1.15.0 | 27 KB | ##################################### | 100% \n", - "Preparing transaction: done\n", - "Verifying transaction: done\n", - "Executing transaction: done\n", - "#\n", - "# To activate this environment, use\n", - "#\n", - "# $ conda activate myenv\n", - "#\n", - "# To deactivate an active environment, use\n", - "#\n", - "# $ conda deactivate\n", - "\n" + " Name Active Path \n", + "────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n", + " base * /jetfs/home/yourusername/micromamba \n", + " modern /jetfs/home/yourusername/micromamba/envs/modern \n", + " myenv /jetfs/home/yourusername/micromamba/envs/myenv " ] } ], "source": [ - "# Create a environment with conda\n", - "!conda create -y -n myenv python=3.7 numpy ipykernel" + "# show available environment\n", + "!micromamba env list" ] }, { @@ -230,87 +138,76 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": {}, + "execution_count": 5, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Installed kernelspec MYENV in /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n" + "Installed kernelspec MYENV in /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n" ] } ], "source": [ - "!~/.conda/envs/myenv/bin/python -m ipykernel install --user --name MYENV --display-name \"Py3.7\"" + "!~/micromamba/envs/myenv/bin/python -m ipykernel install --user --name MYENV --display-name \"Py3.12\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Activate your conda environment\n", - "Conda Environments need to be added to the `PATH` to work well. So there is an `activate` function for these conda environments.\n", - "\n", - "However, running\n", - "```bash\n", - "conda init bash\n", - "```\n", - "will edit your `.bashrc` and that is not nice, especially when you might move to another module. \n", - "**Therefore this is not recommended to do.**\n", - "\n", - "This script is used by `conda init bash` to set the configuration, we simply source (load) it and get the same functionality as we would be using `conda init bash`. \n", - "\n", - "**(Do not use `conda init bash`)**\n", + "### Activate your environment\n", + "Micromamba environments need to be added to the `PATH` to work well. So there is an `activate` function for these environments.\n", "\n", + "**You just need to run this once**\n", "\n", "```bash\n", - "# source the conda functionality\n", - "eval \"$(conda shell.bash hook)\"\n", - "# or\n", - "source $(dirname $(which conda))/../etc/profile.d/conda.sh\n", - "# now activating the environment works\n", - "conda activate myenv\n", - "```\n", - "\n", - "#### bash conda_activate function\n", - "optionally you can add this bash function to your `.bashrc` for convenience:\n", + "# initialize bash shell\n", + "$ micromamba shell init -s bash\n", + "Running `shell init`, which:\n", + " - modifies RC file: \"/jetfs/home/yourusername/.bashrc\"\n", + " - generates config for root prefix: \"/jetfs/home/yourusername/micromamba\"\n", + " - sets mamba executable to: \"/jetfs/manual/micromamba/2.2.0/bin/micromamba\"\n", + "The following has been added in your \"/jetfs/home/yourusername/.bashrc\" file\n", "\n", - "```bash\n", - "conda_activate(){\n", - " if ! command -v conda &> /dev/null; then\n", - " echo \"Load ana/miniconda module first\"\n", - " else\n", - " if [ $# -ne 1 ]; then\n", - " echo \"usage: conda_activate [env-name]\"\n", - " \n", - " else\n", - " source $(dirname $(which conda))/../etc/profile.d/conda.sh\n", - " conda activate $1\n", - " fi\n", - " fi\n", - "}\n", + "# >>> mamba initialize >>>\n", + "# !! Contents within this block are managed by 'micromamba shell init' !!\n", + "export MAMBA_EXE='/jetfs/manual/micromamba/2.2.0/bin/micromamba';\n", + "export MAMBA_ROOT_PREFIX='/jetfs/home/yourusername/micromamba';\n", + "__mamba_setup=\"$(\"$MAMBA_EXE\" shell hook --shell bash --root-prefix \"$MAMBA_ROOT_PREFIX\" 2> /dev/null)\"\n", + "if [ $? -eq 0 ]; then\n", + " eval \"$__mamba_setup\"\n", + "else\n", + " alias micromamba=\"$MAMBA_EXE\" # Fallback on help from micromamba activate\n", + "fi\n", + "unset __mamba_setup\n", + "# <<< mamba initialize <<<\n", "```\n", - "Source your bashrc by running: `source ~/.bashrc` or logout/login again. Then you should be able to use the function:\n", "\n", - "```bash\n", - "module load anaconda3\n", - "conda_activate myenv\n", - "```" + "will edit your `.bashrc`. After some time you might have to do this again, when the micromamba version changed a lot (e.g.: `micromamba shell reinit -s bash`)" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, + "execution_count": 6, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Available kernels:\n", - " myenv /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n", - " python3 /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/share/jupyter/kernels/python3\n" + " myenv /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n", + " rttovv13.2 /jetfs/home/yourusername/.local/share/jupyter/kernels/rttovv13.2\n", + " enstoolsv2021.11 /jetfs/jupyterhub/alpha/share/jupyter/kernels/enstoolsv2021.11\n", + " ir /jetfs/jupyterhub/alpha/share/jupyter/kernels/ir\n", + " modelling /jetfs/jupyterhub/alpha/share/jupyter/kernels/modelling\n", + " python3 /jetfs/jupyterhub/alpha/share/jupyter/kernels/python3\n" ] } ], @@ -383,7 +280,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Installed kernelspec fancy in /jetfs/home/mblaschek/.local/share/jupyter/kernels/fancy\n" + "Installed kernelspec fancy in /jetfs/home/yourusername/.local/share/jupyter/kernels/fancy\n" ] } ], @@ -409,9 +306,8 @@ "output_type": "stream", "text": [ "Available kernels:\n", - " fancy /jetfs/home/mblaschek/.local/share/jupyter/kernels/fancy\n", - " myenv /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n", - " python3 /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/share/jupyter/kernels/python3\n" + " fancy /jetfs/home/yourusername/.local/share/jupyter/kernels/fancy\n", + " myenv /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n" ] } ], @@ -427,19 +323,19 @@ "\n", "In order to get full access to all tools installed in your local environment, add it to your `PATH`.\n", "\n", - "Open your `kernel.json` file located `/jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv/kernel.json`:\n", + "Open your `kernel.json` file located `/jetfs/home/yourusername/.local/share/jupyter/kernels/myenv/kernel.json`:\n", "```json\n", "{\n", " \"argv\": [\n", - " \"/jetfs/home/mblaschek/.conda/envs/myenv/bin/python\",\n", + " \"/jetfs/home/yourusername/micromamba/envs/myenv/bin/python\",\n", " \"-m\",\n", " \"ipykernel_launcher\",\n", " \"-f\",\n", " \"{connection_file}\"\n", " ],\n", " \"env\" : {\n", - " \"PATH\": \"/jetfs/home/mblaschek/.conda/envs/myenv/bin/:${PATH}\",\n", - " \"LD_LIBRARY_PATH\": \"/jetfs/home/mblaschek/.conda/envs/myenv/lib:${LD_LIBRARY_PATH}\"\n", + " \"PATH\": \"/jetfs/home/yourusername/.conda/envs/myenv/bin/:${PATH}\",\n", + " \"LD_LIBRARY_PATH\": \"/jetfs/home/yourusername/micromamba/envs/myenv/lib:${LD_LIBRARY_PATH}\"\n", " },\n", " \"display_name\": \"MYENV\",\n", " \"language\": \"python\"\n", @@ -457,7 +353,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Miniconda3 (4.10.3) - 3.9.5", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -471,7 +367,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-005-Remote-Kernels.ipynb b/Python/QA-005-Remote-Kernels.ipynb index bda6f8585a5c316b97fd24978227edc7740cf2e6..a5814686bea9e1bb06504f7f2216c8b2e2baca7a 100644 --- a/Python/QA-005-Remote-Kernels.ipynb +++ b/Python/QA-005-Remote-Kernels.ipynb @@ -70,7 +70,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: PATH=/home/mblaschek/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n" + "env: PATH=/home/yourusername/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n" ] } ], @@ -108,8 +108,8 @@ "output_type": "stream", "text": [ "Available kernels:\n", - " anaconda3 /home/mblaschek/.local/share/jupyter/kernels/anaconda3\n", - " python3 /home/mblaschek/.local/share/jupyter/kernels/python3\n" + " anaconda3 /home/yourusername/.local/share/jupyter/kernels/anaconda3\n", + " python3 /home/yourusername/.local/share/jupyter/kernels/python3\n" ] } ], @@ -128,7 +128,7 @@ "text": [ "{\n", " \"argv\": [\n", - " \"/home/mblaschek/anaconda3/bin/python\",\n", + " \"/home/yourusername/anaconda3/bin/python\",\n", " \"-m\",\n", " \"ipykernel_launcher\",\n", " \"-f\",\n", @@ -188,7 +188,7 @@ "\n", "1. Module: `miniconda3`\n", "2. Name: `PyS1` for Python on srvx1\n", - "3. Host: `mblaschek@srvx1.img.univie.ac.at` username and server\n", + "3. Host: `yourusername@srvx1.img.univie.ac.at` username and server\n", "\n", "In order to allow easy access [adding the public key to ssh authentication](../SSH-VPN-VNC/SSH.md) is recommended. Otherwise set `export SSH_ASKPASS=1` and you should be prompted each time the connection is established." ] @@ -202,7 +202,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Added kernel ['rik_ssh_mblaschek_srvx1_img_univie_ac_at_pys1']: SSH mblaschek@srvx1.img.univie.ac.at PyS1.\n" + "Added kernel ['rik_ssh_yourusername_srvx1_img_univie_ac_at_pys1']: SSH yourusername@srvx1.img.univie.ac.at PyS1.\n" ] } ], @@ -212,7 +212,7 @@ " --kernel_cmd='kernel-launcher miniconda3 ipython kernel -f {connection_file}' \\\n", " --name='PyS1' \\\n", " --interface=ssh \\\n", - " --host=mblaschek@srvx1.img.univie.ac.at" + " --host=yourusername@srvx1.img.univie.ac.at" ] }, { @@ -225,9 +225,9 @@ "output_type": "stream", "text": [ "Available kernels:\n", - " anaconda3 /home/mblaschek/.local/share/jupyter/kernels/anaconda3\n", - " python3 /home/mblaschek/.local/share/jupyter/kernels/python3\n", - " rik_ssh_mblaschek_srvx1_img_univie_ac_at_pys1 /home/mblaschek/.local/share/jupyter/kernels/rik_ssh_mblaschek_srvx1_img_univie_ac_at_pys1\n" + " anaconda3 /home/yourusername/.local/share/jupyter/kernels/anaconda3\n", + " python3 /home/yourusername/.local/share/jupyter/kernels/python3\n", + " rik_ssh_yourusername_srvx1_img_univie_ac_at_pys1 /home/yourusername/.local/share/jupyter/kernels/rik_ssh_yourusername_srvx1_img_univie_ac_at_pys1\n" ] } ], @@ -253,20 +253,20 @@ " \"--interface\",\n", " \"ssh\",\n", " \"--host\",\n", - " \"mblaschek@srvx1.img.univie.ac.at\",\n", + " \"yourusername@srvx1.img.univie.ac.at\",\n", " \"--kernel_cmd\",\n", " \"kernel-launcher miniconda3 ipython kernel -f {host_connection_file}\",\n", " \"{connection_file}\"\n", " ],\n", - " \"display_name\": \"SSH mblaschek@srvx1.img.univie.ac.at PyS1\",\n", + " \"display_name\": \"SSH yourusername@srvx1.img.univie.ac.at PyS1\",\n", " \"remote_ikernel_argv\": [\n", - " \"/home/mblaschek/.local/bin/remote_ikernel\",\n", + " \"/home/yourusername/.local/bin/remote_ikernel\",\n", " \"manage\",\n", " \"--add\",\n", " \"--kernel_cmd=kernel-launcher miniconda3 ipython kernel -f {connection_file}\",\n", " \"--name=PyS1\",\n", " \"--interface=ssh\",\n", - " \"--host=mblaschek@srvx1.img.univie.ac.at\"\n", + " \"--host=yourusername@srvx1.img.univie.ac.at\"\n", " ]\n", "}" ] @@ -274,7 +274,7 @@ ], "source": [ "# Here we can see that the remote_ikernel actually does.\n", - "!cat /home/mblaschek/.local/share/jupyter/kernels/rik_ssh_mblaschek_srvx1_img_univie_ac_at_pys1/kernel.json" + "!cat /home/yourusername/.local/share/jupyter/kernels/rik_ssh_yourusername_srvx1_img_univie_ac_at_pys1/kernel.json" ] }, { @@ -294,7 +294,7 @@ "outputs": [], "source": [ "# This will launch the remote kernel in a console\n", - "!jupyter console --existing=rik_ssh_mblaschek_srvx1_img_univie_ac_at_pys1" + "!jupyter console --existing=rik_ssh_yourusername_srvx1_img_univie_ac_at_pys1" ] }, { @@ -324,7 +324,7 @@ " --kernel_cmd='/opt/anaconda3/bin/ipython kernel -f {connection_file}' \\\n", " --name='MyP3' \\\n", " --interface=ssh \\\n", - " --host=mblaschek@srvx1.img.univie.ac.at" + " --host=yourusername@srvx1.img.univie.ac.at" ] }, { @@ -346,7 +346,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Anaconda3 (2020.07)", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -360,7 +360,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-006-Add-Packages-to-Anaconda-Modules.ipynb b/Python/QA-006-Add-Packages-to-Anaconda-Modules.ipynb deleted file mode 100644 index 110b0ed0c934e56510a189e71e7a657602930c06..0000000000000000000000000000000000000000 --- a/Python/QA-006-Add-Packages-to-Anaconda-Modules.ipynb +++ /dev/null @@ -1,588 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "2768572a-8dab-44b6-b4f2-129799e71608", - "metadata": { - "tags": [] - }, - "source": [ - "# Add packages to Anaconda module\n", - "\n", - "Sometimes it is necessary to add packages to the default anaconda install, or update to a newer version.\n", - "\n", - "Check the loaded module:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "751822da-638e-46ac-be46-cb605e07253b", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Currently Loaded Modulefiles:\u001b[m\n", - " 1) anaconda3/2020.07-gcc-8.4.1 3) proj/8.1.0-gcc-8.4.1 \u001b[m\n", - " 2) geos/3.9.1-gcc-8.4.1 \u001b[m\n", - "\u001b[K\u001b[?1l\u001b>" - ] - } - ], - "source": [ - "!module list" - ] - }, - { - "cell_type": "markdown", - "id": "518754ec-6ab1-4c4c-ad1a-dd36632c565a", - "metadata": {}, - "source": [ - "Check the default packages in anaconda:" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "447a0d97-71d0-4abd-8171-6961c7d171af", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "# packages in environment at /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex:\n", - "#\n", - "# Name Version Build Channel\n", - "_ipyw_jlab_nb_ext_conf 0.1.0 py38_0 \n", - "_libgcc_mutex 0.1 main \n", - "alabaster 0.7.12 py_0 \n", - "anaconda 2020.07 py38_0 \n", - "anaconda-client 1.7.2 py38_0 \n", - "anaconda-navigator 1.9.12 py38_0 \n", - "anaconda-project 0.8.4 py_0 \n", - "argh 0.26.2 py38_0 \n", - "asn1crypto 1.3.0 py38_0 \n", - "astroid 2.4.2 py38_0 \n", - "astropy 4.0.1.post1 py38h7b6447c_1 \n", - "atomicwrites 1.4.0 py_0 \n", - "attrs 19.3.0 py_0 \n", - "autopep8 1.5.3 py_0 \n", - "babel 2.8.0 py_0 \n", - "backcall 0.2.0 py_0 \n", - "backports 1.0 py_2 \n", - "backports.functools_lru_cache 1.6.1 py_0 \n", - "backports.shutil_get_terminal_size 1.0.0 py38_2 \n", - "backports.tempfile 1.0 py_1 \n", - "backports.weakref 1.0.post1 py_1 \n", - "beautifulsoup4 4.9.1 py38_0 \n", - "bitarray 1.4.0 py38h7b6447c_0 \n", - "bkcharts 0.2 py38_0 \n", - "blas 1.0 mkl \n", - "bleach 3.1.5 py_0 \n", - "blosc 1.19.0 hd408876_0 \n", - "bokeh 2.1.1 py38_0 \n", - "boto 2.49.0 py38_0 \n", - "bottleneck 1.3.2 py38heb32a55_1 \n", - "brotlipy 0.7.0 py38h7b6447c_1000 \n", - "bzip2 1.0.8 h7b6447c_0 \n", - "ca-certificates 2020.6.24 0 \n", - "cairo 1.14.12 h8948797_3 \n", - "certifi 2020.6.20 py38_0 \n", - "cffi 1.14.0 py38he30daa8_1 \n", - "chardet 3.0.4 py38_1003 \n", - "click 7.1.2 py_0 \n", - "cloudpickle 1.5.0 py_0 \n", - "clyent 1.2.2 py38_1 \n", - "colorama 0.4.3 py_0 \n", - "conda 4.8.3 py38_0 \n", - "conda-build 3.18.11 py38_0 \n", - "conda-env 2.6.0 1 \n", - "conda-package-handling 1.6.1 py38h7b6447c_0 \n", - "conda-verify 3.4.2 py_1 \n", - "contextlib2 0.6.0.post1 py_0 \n", - "cryptography 2.9.2 py38h1ba5d50_0 \n", - "curl 7.71.1 hbc83047_1 \n", - "cycler 0.10.0 py38_0 \n", - "cython 0.29.21 py38he6710b0_0 \n", - "cytoolz 0.10.1 py38h7b6447c_0 \n", - "dask 2.20.0 py_0 \n", - "dask-core 2.20.0 py_0 \n", - "dbus 1.13.16 hb2f20db_0 \n", - "decorator 4.4.2 py_0 \n", - "defusedxml 0.6.0 py_0 \n", - "diff-match-patch 20200713 py_0 \n", - "distributed 2.20.0 py38_0 \n", - "docutils 0.16 py38_1 \n", - "entrypoints 0.3 py38_0 \n", - "et_xmlfile 1.0.1 py_1001 \n", - "expat 2.2.9 he6710b0_2 \n", - "fastcache 1.1.0 py38h7b6447c_0 \n", - "filelock 3.0.12 py_0 \n", - "flake8 3.8.3 py_0 \n", - "flask 1.1.2 py_0 \n", - "fontconfig 2.13.0 h9420a91_0 \n", - "freetype 2.10.2 h5ab3b9f_0 \n", - "fribidi 1.0.9 h7b6447c_0 \n", - "fsspec 0.7.4 py_0 \n", - "future 0.18.2 py38_1 \n", - "get_terminal_size 1.0.0 haa9412d_0 \n", - "gevent 20.6.2 py38h7b6447c_0 \n", - "glib 2.65.0 h3eb4bd4_0 \n", - "glob2 0.7 py_0 \n", - "gmp 6.1.2 h6c8ec71_1 \n", - "gmpy2 2.0.8 py38hd5f6e3b_3 \n", - "graphite2 1.3.14 h23475e2_0 \n", - "greenlet 0.4.16 py38h7b6447c_0 \n", - "gst-plugins-base 1.14.0 hbbd80ab_1 \n", - "gstreamer 1.14.0 hb31296c_0 \n", - "h5py 2.10.0 py38h7918eee_0 \n", - "harfbuzz 2.4.0 hca77d97_1 \n", - "hdf5 1.10.4 hb1b8bf9_0 \n", - "heapdict 1.0.1 py_0 \n", - "html5lib 1.1 py_0 \n", - "icu 58.2 he6710b0_3 \n", - "idna 2.10 py_0 \n", - "imageio 2.9.0 py_0 \n", - "imagesize 1.2.0 py_0 \n", - "importlib-metadata 1.7.0 py38_0 \n", - "importlib_metadata 1.7.0 0 \n", - "intel-openmp 2020.1 217 \n", - "intervaltree 3.0.2 py_1 \n", - "ipykernel 5.3.2 py38h5ca1d4c_0 \n", - "ipython 7.16.1 py38h5ca1d4c_0 \n", - "ipython_genutils 0.2.0 py38_0 \n", - "ipywidgets 7.5.1 py_0 \n", - "isort 4.3.21 py38_0 \n", - "itsdangerous 1.1.0 py_0 \n", - "jbig 2.1 hdba287a_0 \n", - "jdcal 1.4.1 py_0 \n", - "jedi 0.17.1 py38_0 \n", - "jeepney 0.4.3 py_0 \n", - "jinja2 2.11.2 py_0 \n", - "joblib 0.16.0 py_0 \n", - "jpeg 9b h024ee3a_2 \n", - "json5 0.9.5 py_0 \n", - "jsonschema 3.2.0 py38_0 \n", - "jupyter 1.0.0 py38_7 \n", - "jupyter_client 6.1.6 py_0 \n", - "jupyter_console 6.1.0 py_0 \n", - "jupyter_core 4.6.3 py38_0 \n", - "jupyterlab 2.1.5 py_0 \n", - "jupyterlab_server 1.2.0 py_0 \n", - "keyring 21.2.1 py38_0 \n", - "kiwisolver 1.2.0 py38hfd86e86_0 \n", - "krb5 1.18.2 h173b8e3_0 \n", - "lazy-object-proxy 1.4.3 py38h7b6447c_0 \n", - "lcms2 2.11 h396b838_0 \n", - "ld_impl_linux-64 2.33.1 h53a641e_7 \n", - "libarchive 3.4.2 h62408e4_0 \n", - "libcurl 7.71.1 h20c2e04_1 \n", - "libedit 3.1.20191231 h14c3975_1 \n", - "libffi 3.3 he6710b0_2 \n", - "libgcc-ng 9.1.0 hdf63c60_0 \n", - "libgfortran-ng 7.3.0 hdf63c60_0 \n", - "liblief 0.10.1 he6710b0_0 \n", - "libllvm9 9.0.1 h4a3c616_1 \n", - "libpng 1.6.37 hbc83047_0 \n", - "libsodium 1.0.18 h7b6447c_0 \n", - "libspatialindex 1.9.3 he6710b0_0 \n", - "libssh2 1.9.0 h1ba5d50_1 \n", - "libstdcxx-ng 9.1.0 hdf63c60_0 \n", - "libtiff 4.1.0 h2733197_1 \n", - "libtool 2.4.6 h7b6447c_5 \n", - "libuuid 1.0.3 h1bed415_2 \n", - "libxcb 1.14 h7b6447c_0 \n", - "libxml2 2.9.10 he19cac6_1 \n", - "libxslt 1.1.34 hc22bd24_0 \n", - "llvmlite 0.33.0 py38hc6ec683_1 \n", - "locket 0.2.0 py38_1 \n", - "lxml 4.5.2 py38hefd8a0e_0 \n", - "lz4-c 1.9.2 he6710b0_0 \n", - "lzo 2.10 h7b6447c_2 \n", - "markupsafe 1.1.1 py38h7b6447c_0 \n", - "matplotlib 3.2.2 0 \n", - "matplotlib-base 3.2.2 py38hef1b27d_0 \n", - "mccabe 0.6.1 py38_1 \n", - "mistune 0.8.4 py38h7b6447c_1000 \n", - "mkl 2020.1 217 \n", - "mkl-service 2.3.0 py38he904b0f_0 \n", - "mkl_fft 1.1.0 py38h23d657b_0 \n", - "mkl_random 1.1.1 py38h0573a6f_0 \n", - "mock 4.0.2 py_0 \n", - "more-itertools 8.4.0 py_0 \n", - "mpc 1.1.0 h10f8cd9_1 \n", - "mpfr 4.0.2 hb69a4c5_1 \n", - "mpmath 1.1.0 py38_0 \n", - "msgpack-python 1.0.0 py38hfd86e86_1 \n", - "multipledispatch 0.6.0 py38_0 \n", - "navigator-updater 0.2.1 py38_0 \n", - "nbconvert 5.6.1 py38_0 \n", - "nbformat 5.0.7 py_0 \n", - "ncurses 6.2 he6710b0_1 \n", - "networkx 2.4 py_1 \n", - "nltk 3.5 py_0 \n", - "nose 1.3.7 py38_2 \n", - "notebook 6.0.3 py38_0 \n", - "numba 0.50.1 py38h0573a6f_1 \n", - "numexpr 2.7.1 py38h423224d_0 \n", - "numpy 1.18.5 py38ha1c710e_0 \n", - "numpy-base 1.18.5 py38hde5b4d6_0 \n", - "numpydoc 1.1.0 py_0 \n", - "olefile 0.46 py_0 \n", - "openpyxl 3.0.4 py_0 \n", - "openssl 1.1.1g h7b6447c_0 \n", - "packaging 20.4 py_0 \n", - "pandas 1.0.5 py38h0573a6f_0 \n", - "pandoc 2.10 0 \n", - "pandocfilters 1.4.2 py38_1 \n", - "pango 1.45.3 hd140c19_0 \n", - "parso 0.7.0 py_0 \n", - "partd 1.1.0 py_0 \n", - "patchelf 0.11 he6710b0_0 \n", - "path 13.1.0 py38_0 \n", - "path.py 12.4.0 0 \n", - "pathlib2 2.3.5 py38_0 \n", - "pathtools 0.1.2 py_1 \n", - "patsy 0.5.1 py38_0 \n", - "pcre 8.44 he6710b0_0 \n", - "pep8 1.7.1 py38_0 \n", - "pexpect 4.8.0 py38_0 \n", - "pickleshare 0.7.5 py38_1000 \n", - "pillow 7.2.0 py38hb39fc2d_0 \n", - "pip 20.1.1 py38_1 \n", - "pixman 0.40.0 h7b6447c_0 \n", - "pkginfo 1.5.0.1 py38_0 \n", - "pluggy 0.13.1 py38_0 \n", - "ply 3.11 py38_0 \n", - "prometheus_client 0.8.0 py_0 \n", - "prompt-toolkit 3.0.5 py_0 \n", - "prompt_toolkit 3.0.5 0 \n", - "psutil 5.7.0 py38h7b6447c_0 \n", - "ptyprocess 0.6.0 py38_0 \n", - "py 1.9.0 py_0 \n", - "py-lief 0.10.1 py38h403a769_0 \n", - "pycodestyle 2.6.0 py_0 \n", - "pycosat 0.6.3 py38h7b6447c_1 \n", - "pycparser 2.20 py_2 \n", - "pycurl 7.43.0.5 py38h1ba5d50_0 \n", - "pydocstyle 5.0.2 py_0 \n", - "pyflakes 2.2.0 py_0 \n", - "pygments 2.6.1 py_0 \n", - "pylint 2.5.3 py38_0 \n", - "pyodbc 4.0.30 py38he6710b0_0 \n", - "pyopenssl 19.1.0 py_1 \n", - "pyparsing 2.4.7 py_0 \n", - "pyqt 5.9.2 py38h05f1152_4 \n", - "pyrsistent 0.16.0 py38h7b6447c_0 \n", - "pysocks 1.7.1 py38_0 \n", - "pytables 3.6.1 py38h9fd0a39_0 \n", - "pytest 5.4.3 py38_0 \n", - "python 3.8.3 hcff3b4d_2 \n", - "python-dateutil 2.8.1 py_0 \n", - "python-jsonrpc-server 0.3.4 py_1 \n", - "python-language-server 0.34.1 py38_0 \n", - "python-libarchive-c 2.9 py_0 \n", - "pytz 2020.1 py_0 \n", - "pywavelets 1.1.1 py38h7b6447c_0 \n", - "pyxdg 0.26 py_0 \n", - "pyyaml 5.3.1 py38h7b6447c_1 \n", - "pyzmq 19.0.1 py38he6710b0_1 \n", - "qdarkstyle 2.8.1 py_0 \n", - "qt 5.9.7 h5867ecd_1 \n", - "qtawesome 0.7.2 py_0 \n", - "qtconsole 4.7.5 py_0 \n", - "qtpy 1.9.0 py_0 \n", - "readline 8.0 h7b6447c_0 \n", - "regex 2020.6.8 py38h7b6447c_0 \n", - "requests 2.24.0 py_0 \n", - "ripgrep 11.0.2 he32d670_0 \n", - "rope 0.17.0 py_0 \n", - "rtree 0.9.4 py38_1 \n", - "ruamel_yaml 0.15.87 py38h7b6447c_1 \n", - "scikit-image 0.16.2 py38h0573a6f_0 \n", - "scikit-learn 0.23.1 py38h423224d_0 \n", - "scipy 1.5.0 py38h0b6359f_0 \n", - "seaborn 0.10.1 py_0 \n", - "secretstorage 3.1.2 py38_0 \n", - "send2trash 1.5.0 py38_0 \n", - "setuptools 49.2.0 py38_0 \n", - "simplegeneric 0.8.1 py38_2 \n", - "singledispatch 3.4.0.3 py38_0 \n", - "sip 4.19.13 py38he6710b0_0 \n", - "six 1.15.0 py_0 \n", - "snappy 1.1.8 he6710b0_0 \n", - "snowballstemmer 2.0.0 py_0 \n", - "sortedcollections 1.2.1 py_0 \n", - "sortedcontainers 2.2.2 py_0 \n", - "soupsieve 2.0.1 py_0 \n", - "sphinx 3.1.2 py_0 \n", - "sphinxcontrib 1.0 py38_1 \n", - "sphinxcontrib-applehelp 1.0.2 py_0 \n", - "sphinxcontrib-devhelp 1.0.2 py_0 \n", - "sphinxcontrib-htmlhelp 1.0.3 py_0 \n", - "sphinxcontrib-jsmath 1.0.1 py_0 \n", - "sphinxcontrib-qthelp 1.0.3 py_0 \n", - "sphinxcontrib-serializinghtml 1.1.4 py_0 \n", - "sphinxcontrib-websupport 1.2.3 py_0 \n", - "spyder 4.1.4 py38_0 \n", - "spyder-kernels 1.9.2 py38_0 \n", - "sqlalchemy 1.3.18 py38h7b6447c_0 \n", - "sqlite 3.32.3 h62c20be_0 \n", - "statsmodels 0.11.1 py38h7b6447c_0 \n", - "sympy 1.6.1 py38_0 \n", - "tbb 2020.0 hfd86e86_0 \n", - "tblib 1.6.0 py_0 \n", - "terminado 0.8.3 py38_0 \n", - "testpath 0.4.4 py_0 \n", - "threadpoolctl 2.1.0 pyh5ca1d4c_0 \n", - "tk 8.6.10 hbc83047_0 \n", - "toml 0.10.1 py_0 \n", - "toolz 0.10.0 py_0 \n", - "tornado 6.0.4 py38h7b6447c_1 \n", - "tqdm 4.47.0 py_0 \n", - "traitlets 4.3.3 py38_0 \n", - "typing_extensions 3.7.4.2 py_0 \n", - "ujson 1.35 py38h7b6447c_0 \n", - "unicodecsv 0.14.1 py38_0 \n", - "unixodbc 2.3.7 h14c3975_0 \n", - "urllib3 1.25.9 py_0 \n", - "watchdog 0.10.3 py38_0 \n", - "wcwidth 0.2.5 py_0 \n", - "webencodings 0.5.1 py38_1 \n", - "werkzeug 1.0.1 py_0 \n", - "wheel 0.34.2 py38_0 \n", - "widgetsnbextension 3.5.1 py38_0 \n", - "wrapt 1.11.2 py38h7b6447c_0 \n", - "wurlitzer 2.0.1 py38_0 \n", - "xlrd 1.2.0 py_0 \n", - "xlsxwriter 1.2.9 py_0 \n", - "xlwt 1.3.0 py38_0 \n", - "xmltodict 0.12.0 py_0 \n", - "xz 5.2.5 h7b6447c_0 \n", - "yaml 0.2.5 h7b6447c_0 \n", - "yapf 0.30.0 py_0 \n", - "zeromq 4.3.2 he6710b0_2 \n", - "zict 2.0.0 py_0 \n", - "zipp 3.1.0 py_0 \n", - "zlib 1.2.11 h7b6447c_3 \n", - "zope 1.0 py38_1 \n", - "zope.event 4.4 py38_0 \n", - "zope.interface 4.7.1 py38h7b6447c_0 \n", - "zstd 1.4.5 h0b5b093_0 \n" - ] - } - ], - "source": [ - "!conda list" - ] - }, - { - "cell_type": "markdown", - "id": "ac91b684-0f70-4d1e-9ce6-98cf91ac09a0", - "metadata": {}, - "source": [ - "## Add a new package\n", - "\n", - "It is easily possible to add packages to a module installed anaconda distribution. These additional pacakges are stored in your `$HOME/.local` directory." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "887e26a0-1ccb-4b4e-92b2-b7dc9d1457b6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "3.8.3 (default, Jul 2 2020, 16:21:59) \n", - "[GCC 7.3.0]\n" - ] - } - ], - "source": [ - "# Check what version you are using?\n", - "import sys\n", - "print(sys.version)" - ] - }, - { - "cell_type": "markdown", - "id": "15eb2567-de4a-4740-b845-0a3e8802c998", - "metadata": {}, - "source": [ - "Based on that version you might already have a directory in your local directory. Within these directories your manually installed packages will be stored. These are default paths, and your python interpreter will always look there.\n", - "\n", - "**Special Note: If you want to ignore these user directories use** `export PYTHONNOUSERSITE=True`\n", - "This variable must be set manually. Default is to use user directories." - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "188c9565-e45d-49ea-b37c-0e2e272362ea", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "python3.7 python3.8\n" - ] - } - ], - "source": [ - "!ls $HOME/.local/lib" - ] - }, - { - "cell_type": "markdown", - "id": "45095b0c-dd63-43c8-af35-c6b216b9f984", - "metadata": {}, - "source": [ - "Now let's install the package `metpy` [doc](https://unidata.github.io/MetPy/latest/index.html)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "7c72f540-672d-459f-9455-6301b586d26c", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting metpy\n", - " Downloading MetPy-1.1.0-py3-none-any.whl (361 kB)\n", - "\u001b[K |████████████████████████████████| 361 kB 14.9 MB/s eta 0:00:01\n", - "\u001b[?25hCollecting pint>=0.10.1\n", - " Downloading Pint-0.17-py2.py3-none-any.whl (204 kB)\n", - "\u001b[K |████████████████████████████████| 204 kB 81.4 MB/s eta 0:00:01\n", - "\u001b[?25hRequirement already satisfied: matplotlib>=3.0.1 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from metpy) (3.2.2)\n", - "Requirement already satisfied: pyproj>=2.3.0 in /home/spack/.local/lib/python3.8/site-packages (from metpy) (3.2.1)\n", - "Collecting importlib-resources>=1.3.0; python_version < \"3.9\"\n", - " Downloading importlib_resources-5.2.2-py3-none-any.whl (27 kB)\n", - "Collecting pooch>=0.1\n", - " Downloading pooch-1.5.2-py3-none-any.whl (57 kB)\n", - "\u001b[K |████████████████████████████████| 57 kB 15.4 MB/s eta 0:00:01\n", - "\u001b[?25hCollecting xarray>=0.14.1\n", - " Using cached xarray-0.19.0-py3-none-any.whl (827 kB)\n", - "Requirement already satisfied: traitlets>=4.3.0 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from metpy) (4.3.3)\n", - "Requirement already satisfied: scipy>=1.2.0 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from metpy) (1.5.0)\n", - "Requirement already satisfied: numpy>=1.17.0 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from metpy) (1.18.5)\n", - "Requirement already satisfied: pandas>=0.24.0 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from metpy) (1.0.5)\n", - "Requirement already satisfied: packaging in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from pint>=0.10.1->metpy) (20.4)\n", - "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from matplotlib>=3.0.1->metpy) (2.4.7)\n", - "Requirement already satisfied: python-dateutil>=2.1 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from matplotlib>=3.0.1->metpy) (2.8.1)\n", - "Requirement already satisfied: cycler>=0.10 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from matplotlib>=3.0.1->metpy) (0.10.0)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from matplotlib>=3.0.1->metpy) (1.2.0)\n", - "Requirement already satisfied: certifi in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from pyproj>=2.3.0->metpy) (2020.6.20)\n", - "Requirement already satisfied: zipp>=3.1.0; python_version < \"3.10\" in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from importlib-resources>=1.3.0; python_version < \"3.9\"->metpy) (3.1.0)\n", - "Collecting appdirs\n", - " Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)\n", - "Requirement already satisfied: requests in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from pooch>=0.1->metpy) (2.24.0)\n", - "Requirement already satisfied: setuptools>=40.4 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from xarray>=0.14.1->metpy) (49.2.0.post20200714)\n", - "Requirement already satisfied: six in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from traitlets>=4.3.0->metpy) (1.15.0)\n", - "Requirement already satisfied: ipython-genutils in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from traitlets>=4.3.0->metpy) (0.2.0)\n", - "Requirement already satisfied: decorator in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from traitlets>=4.3.0->metpy) (4.4.2)\n", - "Requirement already satisfied: pytz>=2017.2 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from pandas>=0.24.0->metpy) (2020.1)\n", - "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from requests->pooch>=0.1->metpy) (1.25.9)\n", - "Requirement already satisfied: idna<3,>=2.5 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from requests->pooch>=0.1->metpy) (2.10)\n", - "Requirement already satisfied: chardet<4,>=3.0.2 in /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex/lib/python3.8/site-packages (from requests->pooch>=0.1->metpy) (3.0.4)\n", - "Installing collected packages: pint, importlib-resources, appdirs, pooch, xarray, metpy\n", - "Successfully installed appdirs-1.4.4 importlib-resources-5.2.2 metpy-1.1.0 pint-0.17 pooch-1.5.2 xarray-0.19.0\n" - ] - } - ], - "source": [ - "# Note that using --user might not be necessary for you, but it's a good reminder.\n", - "!pip install --user metpy" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "1813067a-bc16-4e39-a643-75a898298597", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "MetPy 1.1.0\n" - ] - } - ], - "source": [ - "# check if metpy is installed?\n", - "!pip list | grep -i metpy" - ] - }, - { - "cell_type": "markdown", - "id": "c11af8c6-c3b4-4199-b399-1c43979d2c82", - "metadata": {}, - "source": [ - "**Note: conda won't show the packages as listed**" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "775802ab-433d-41ed-86c8-6c5d6adbfb36", - "metadata": {}, - "outputs": [], - "source": [ - "import metpy" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "c2518d87-48b8-4a36-a212-6f4f87cece55", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/home/spack/.local/lib/python3.8/site-packages/metpy/__init__.py'" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# this shows where the python module is installed, in your .local directory.\n", - "metpy.__file__" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Anaconda3 (2020.07)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.3" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/Python/QA-007-Restore-Conda-Environments.ipynb b/Python/QA-007-Restore-Conda-Environments.ipynb index a84c7eb699a1a4148f7e24b3f150e3f91d5ded31..d379ffa385cda89b399a008581d831e19bfff399 100644 --- a/Python/QA-007-Restore-Conda-Environments.ipynb +++ b/Python/QA-007-Restore-Conda-Environments.ipynb @@ -5,7 +5,7 @@ "id": "18953a0d-48d2-454f-9402-40cd0aac6bdb", "metadata": {}, "source": [ - "# Restore / Save Conda Environments\n", + "# Restore / Save Conda/Micromamba Environments\n", "\n", "Sometimes it just works and you do not want to change anything.\n", "\n", @@ -32,15 +32,16 @@ "cell_type": "code", "execution_count": 1, "id": "e7c0b076-e7d2-48e1-a177-c55a4451040d", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\u001b[m\n", - " 1) anaconda3/2020.07-gcc-8.4.1 3) proj/8.1.0-gcc-8.4.1 \u001b[m\n", - " 2) geos/3.9.1-gcc-8.4.1 \u001b[m\n", + " 1) micromamba/2.2.0 \u001b[m\n", "\u001b[K\u001b[?1l\u001b>" ] } @@ -51,37 +52,32 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "8932eb21-2025-40ec-8744-2730b19455eb", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "# conda environments:\n", - "#\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-l2bohj4adsd6r2oweeytdzrgqmjl64lt\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-5qezliv3bkrc63cv2zk2lyh3xioozd45\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/miniconda3-4.9.2-htox4jjktvvm7b4d3rfwpwpwa4i2kkhk\n", - " /home/spack/envs/test\n", - " /home/swd/anaconda3\n", - " /home/swd/manual/intelpython/intelpython/latest\n", - " /home/swd/manual/intelpython/intelpython/latest/envs/2021.4.0\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda2-2019.10-eaw5h5kknfwa3bsjnjhqfhytzfxgd3nf\n", - "base * /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.11-v46okvjlotnor7yrmpqnbn63xt3a2qyq\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2021.05-hrg2ocjseksc4af3osaiipzu433xctef\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/miniconda2-4.7.12.1-3r6cvxekrhf32f6tdeout3aq7xxsgjit\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/miniconda3-4.10.3-l23y36yispi4ue5w7mhyc4mllio4ylfm\n", - "\n" + " Name Active Path \n", + "────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n", + " base * /jetfs/home/yourusername/micromamba \n", + " modern /jetfs/home/yourusername/micromamba/envs/modern \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda2-2019.10-5pou6jiel7heivyyjwlgwcyltniipjlp \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2019.10-tmy5mgp3gzy7uqkouhm33gfyp3p3xpsu \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-weugqkfkxd6zmn2irm7lpmujzczwebiw \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda2-4.7.12.1-zduqggvbh63zrdghrlty4ncwiclobaja\n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv \n" ] } ], "source": [ "# Check What environment are present\n", "# Typically there are some root installed environments\n", - "!conda env list" + "!micromamba env list" ] }, { @@ -89,99 +85,438 @@ "id": "6253ef9a-6761-497e-9921-863320f6ae2f", "metadata": {}, "source": [ - "But there is one called **test** in `/home/spack/envs/test` which we are going to backup." + "We want to backup the **modern** environment." ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "id": "735145c2-c24d-4006-9751-9c2a5f684387", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "# packages in environment at /home/spack/envs/test:\n", - "#\n", - "# Name Version Build Channel\n", - "_libgcc_mutex 0.1 main \n", - "_openmp_mutex 4.5 1_gnu \n", - "ca-certificates 2021.9.30 h06a4308_1 \n", - "certifi 2021.10.8 py39h06a4308_0 \n", - "ld_impl_linux-64 2.35.1 h7274673_9 \n", - "libffi 3.3 he6710b0_2 \n", - "libgcc-ng 9.3.0 h5101ec6_17 \n", - "libgomp 9.3.0 h5101ec6_17 \n", - "libstdcxx-ng 9.3.0 hd4cf53a_17 \n", - "ncurses 6.2 he6710b0_1 \n", - "openssl 1.1.1l h7f8727e_0 \n", - "pip 21.2.4 py39h06a4308_0 \n", - "python 3.9.7 h12debd9_1 \n", - "readline 8.1 h27cfd23_0 \n", - "setuptools 58.0.4 py39h06a4308_0 \n", - "sqlite 3.36.0 hc218d9a_0 \n", - "tk 8.6.11 h1ccaba5_0 \n", - "tzdata 2021a h5d7bf9c_0 \n", - "wheel 0.37.0 pyhd3eb1b0_1 \n", - "xz 5.2.5 h7b6447c_0 \n", - "zlib 1.2.11 h7b6447c_3 \n" + "List of packages in environment: \"/jetfs/home/yourusername/micromamba/envs/modern\"\n", + "\n", + " Name Version Build Channel \n", + "─────────────────────────────────────────────────────────────────────────────────────\n", + " _libgcc_mutex 0.1 conda_forge conda-forge\n", + " _openmp_mutex 4.5 2_gnu conda-forge\n", + " asttokens 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " aws-c-auth 0.8.1 h205f482_0 conda-forge\n", + " aws-c-cal 0.8.1 h1a47875_3 conda-forge\n", + " aws-c-common 0.10.6 hb9d3cd8_0 conda-forge\n", + " aws-c-compression 0.3.0 h4e1184b_5 conda-forge\n", + " aws-c-event-stream 0.5.0 h7959bf6_11 conda-forge\n", + " aws-c-http 0.9.2 hefd7a92_4 conda-forge\n", + " aws-c-io 0.15.3 h173a860_6 conda-forge\n", + " aws-c-mqtt 0.11.0 h11f4f37_12 conda-forge\n", + " aws-c-s3 0.7.9 he1b24dc_1 conda-forge\n", + " aws-c-sdkutils 0.2.2 h4e1184b_0 conda-forge\n", + " aws-checksums 0.2.2 h4e1184b_4 conda-forge\n", + " aws-crt-cpp 0.29.9 he0e7f3f_2 conda-forge\n", + " aws-sdk-cpp 1.11.489 h4d475cb_0 conda-forge\n", + " azure-core-cpp 1.14.0 h5cfcd09_0 conda-forge\n", + " azure-identity-cpp 1.10.0 h113e628_0 conda-forge\n", + " azure-storage-blobs-cpp 12.13.0 h3cf044e_1 conda-forge\n", + " azure-storage-common-cpp 12.8.0 h736e048_1 conda-forge\n", + " azure-storage-files-datalake-cpp 12.12.0 ha633028_1 conda-forge\n", + " bokeh 3.6.3 pyhd8ed1ab_0 conda-forge\n", + " brotli-python 1.1.0 py312h2ec8cdc_2 conda-forge\n", + " bzip2 1.0.8 h4bc722e_7 conda-forge\n", + " c-ares 1.34.4 hb9d3cd8_0 conda-forge\n", + " ca-certificates 2025.1.31 hbcca054_0 conda-forge\n", + " certifi 2024.12.14 pyhd8ed1ab_0 conda-forge\n", + " cffi 1.17.1 py312h06ac9bb_0 conda-forge\n", + " click 8.1.8 pyh707e725_0 conda-forge\n", + " cloudpickle 3.1.1 pyhd8ed1ab_0 conda-forge\n", + " contourpy 1.3.1 py312h68727a3_0 conda-forge\n", + " crc32c 2.7.1 py312h66e93f0_0 conda-forge\n", + " cytoolz 1.0.1 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mdask \u001b[0m 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " dask-core 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " decorator 5.1.1 pyhd8ed1ab_1 conda-forge\n", + " deprecated 1.2.18 pyhd8ed1ab_0 conda-forge\n", + " distributed 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " donfig 0.8.1.post1 pyhd8ed1ab_1 conda-forge\n", + " exceptiongroup 1.2.2 pyhd8ed1ab_1 conda-forge\n", + " executing 2.1.0 pyhd8ed1ab_1 conda-forge\n", + " freetype 2.12.1 h267a509_2 conda-forge\n", + " fsspec 2025.2.0 pyhd8ed1ab_0 conda-forge\n", + " gflags 2.2.2 h5888daf_1005 conda-forge\n", + " glog 0.7.1 hbabe93e_0 conda-forge\n", + " h2 4.2.0 pyhd8ed1ab_0 conda-forge\n", + " hpack 4.1.0 pyhd8ed1ab_0 conda-forge\n", + " hyperframe 6.1.0 pyhd8ed1ab_0 conda-forge\n", + " importlib-metadata 8.6.1 pyha770c72_0 conda-forge\n", + " \u001b[1m\u001b[34mipython \u001b[0m 8.32.0 pyh907856f_0 conda-forge\n", + " jedi 0.19.2 pyhd8ed1ab_1 conda-forge\n", + " jinja2 3.1.5 pyhd8ed1ab_0 conda-forge\n", + " keyutils 1.6.1 h166bdaf_0 conda-forge\n", + " krb5 1.21.3 h659f571_0 conda-forge\n", + " lcms2 2.17 h717163a_0 conda-forge\n", + " ld_impl_linux-64 2.43 h712a8e2_2 conda-forge\n", + " lerc 4.0.0 h27087fc_0 conda-forge\n", + " libabseil 20240722.0 cxx17_hbbce691_4 conda-forge\n", + " libarrow 19.0.0 h00a82cf_8_cpu conda-forge\n", + " libarrow-acero 19.0.0 hcb10f89_8_cpu conda-forge\n", + " libarrow-dataset 19.0.0 hcb10f89_8_cpu conda-forge\n", + " libarrow-substrait 19.0.0 h08228c5_8_cpu conda-forge\n", + " libblas 3.9.0 28_h59b9bed_openblas conda-forge\n", + " libbrotlicommon 1.1.0 hb9d3cd8_2 conda-forge\n", + " libbrotlidec 1.1.0 hb9d3cd8_2 conda-forge\n", + " libbrotlienc 1.1.0 hb9d3cd8_2 conda-forge\n", + " libcblas 3.9.0 28_he106b2a_openblas conda-forge\n", + " libcrc32c 1.1.2 h9c3ff4c_0 conda-forge\n", + " libcurl 8.11.1 h332b0f4_0 conda-forge\n", + " libdeflate 1.23 h4ddbbb0_0 conda-forge\n", + " libedit 3.1.20250104 pl5321h7949ede_0 conda-forge\n", + " libev 4.33 hd590300_2 conda-forge\n", + " libevent 2.1.12 hf998b51_1 conda-forge\n", + " libexpat 2.6.4 h5888daf_0 conda-forge\n", + " libffi 3.4.2 h7f98852_5 conda-forge\n", + " libgcc 14.2.0 h77fa898_1 conda-forge\n", + " libgcc-ng 14.2.0 h69a702a_1 conda-forge\n", + " libgfortran 14.2.0 h69a702a_1 conda-forge\n", + " libgfortran5 14.2.0 hd5240d6_1 conda-forge\n", + " libgomp 14.2.0 h77fa898_1 conda-forge\n", + " libgoogle-cloud 2.34.0 h2b5623c_0 conda-forge\n", + " libgoogle-cloud-storage 2.34.0 h0121fbd_0 conda-forge\n", + " libgrpc 1.67.1 h25350d4_1 conda-forge\n", + " libiconv 1.17 hd590300_2 conda-forge\n", + " libjpeg-turbo 3.0.0 hd590300_1 conda-forge\n", + " liblapack 3.9.0 28_h7ac8fdf_openblas conda-forge\n", + " libllvm15 15.0.7 hb3ce162_4 conda-forge\n", + " liblzma 5.6.4 hb9d3cd8_0 conda-forge\n", + " liblzma-devel 5.6.4 hb9d3cd8_0 conda-forge\n", + " libnghttp2 1.64.0 h161d5f1_0 conda-forge\n", + " libnsl 2.0.1 hd590300_0 conda-forge\n", + " libopenblas 0.3.28 pthreads_h94d23a6_1 conda-forge\n", + " libopentelemetry-cpp 1.18.0 hfcad708_1 conda-forge\n", + " libopentelemetry-cpp-headers 1.18.0 ha770c72_1 conda-forge\n", + " libparquet 19.0.0 h081d1f1_8_cpu conda-forge\n", + " libpng 1.6.46 h943b412_0 conda-forge\n", + " libprotobuf 5.28.3 h6128344_1 conda-forge\n", + " libre2-11 2024.07.02 hbbce691_2 conda-forge\n", + " libsqlite 3.48.0 hee588c1_1 conda-forge\n", + " libssh2 1.11.1 hf672d98_0 conda-forge\n", + " libstdcxx 14.2.0 hc0a3c3a_1 conda-forge\n", + " libstdcxx-ng 14.2.0 h4852527_1 conda-forge\n", + " libthrift 0.21.0 h0e7cc3e_0 conda-forge\n", + " libtiff 4.7.0 hd9ff511_3 conda-forge\n", + " libutf8proc 2.10.0 h4c51ac1_0 conda-forge\n", + " libuuid 2.38.1 h0b41bf4_0 conda-forge\n", + " libwebp-base 1.5.0 h851e524_0 conda-forge\n", + " libxcb 1.17.0 h8a09558_0 conda-forge\n", + " libxml2 2.13.5 h0d44e9d_1 conda-forge\n", + " libzlib 1.3.1 hb9d3cd8_2 conda-forge\n", + " llvmlite 0.44.0 py312h374181b_0 conda-forge\n", + " locket 1.0.0 pyhd8ed1ab_0 conda-forge\n", + " lz4 4.3.3 py312hf0f0c11_2 conda-forge\n", + " lz4-c 1.10.0 h5888daf_1 conda-forge\n", + " markupsafe 3.0.2 py312h178313f_1 conda-forge\n", + " matplotlib-inline 0.1.7 pyhd8ed1ab_1 conda-forge\n", + " msgpack-python 1.1.0 py312h68727a3_0 conda-forge\n", + " ncurses 6.5 h2d0b736_3 conda-forge\n", + " nlohmann_json 3.11.3 he02047a_1 conda-forge\n", + " numba 0.61.0 py312h2e6246c_1 conda-forge\n", + " numcodecs 0.15.0 py312hf9745cd_0 conda-forge\n", + " numpy 2.1.3 py312h58c1407_0 conda-forge\n", + " openjpeg 2.5.3 h5fbd93e_0 conda-forge\n", + " openssl 3.4.0 h7b32b05_1 conda-forge\n", + " orc 2.0.3 h12ee42a_2 conda-forge\n", + " packaging 24.2 pyhd8ed1ab_2 conda-forge\n", + " pandas 2.2.3 py312hf9745cd_1 conda-forge\n", + " parso 0.8.4 pyhd8ed1ab_1 conda-forge\n", + " partd 1.4.2 pyhd8ed1ab_0 conda-forge\n", + " pexpect 4.9.0 pyhd8ed1ab_1 conda-forge\n", + " pickleshare 0.7.5 pyhd8ed1ab_1004 conda-forge\n", + " pillow 11.1.0 py312h80c1187_0 conda-forge\n", + " pip 25.0.1 pyh8b19718_0 conda-forge\n", + " proj 9.5.1 h0054346_0 conda-forge\n", + " prometheus-cpp 1.3.0 ha5d0236_0 conda-forge\n", + " prompt-toolkit 3.0.50 pyha770c72_0 conda-forge\n", + " psutil 6.1.1 py312h66e93f0_0 conda-forge\n", + " pthread-stubs 0.4 hb9d3cd8_1002 conda-forge\n", + " ptyprocess 0.7.0 pyhd8ed1ab_1 conda-forge\n", + " pure_eval 0.2.3 pyhd8ed1ab_1 conda-forge\n", + " pyarrow 19.0.0 py312h7900ff3_0 conda-forge\n", + " pyarrow-core 19.0.0 py312h01725c0_0_cpu conda-forge\n", + " pycparser 2.22 pyh29332c3_1 conda-forge\n", + " pygments 2.19.1 pyhd8ed1ab_0 conda-forge\n", + " pyproj 3.7.0 py312he630544_0 conda-forge\n", + " pysocks 1.7.1 pyha55dd90_7 conda-forge\n", + " \u001b[1m\u001b[34mpython \u001b[0m 3.12.0 hab00c5b_0_cpython conda-forge\n", + " python-dateutil 2.9.0.post0 pyhff2d567_1 conda-forge\n", + " python-tzdata 2025.1 pyhd8ed1ab_0 conda-forge\n", + " python_abi 3.12 5_cp312 conda-forge\n", + " pytz 2024.1 pyhd8ed1ab_0 conda-forge\n", + " pyyaml 6.0.2 py312h178313f_2 conda-forge\n", + " re2 2024.07.02 h9925aae_2 conda-forge\n", + " readline 8.2 h8228510_1 conda-forge\n", + " s2n 1.5.11 h072c03f_0 conda-forge\n", + " setuptools 75.8.0 pyhff2d567_0 conda-forge\n", + " six 1.17.0 pyhd8ed1ab_0 conda-forge\n", + " snappy 1.2.1 h8bd8927_1 conda-forge\n", + " sortedcontainers 2.4.0 pyhd8ed1ab_1 conda-forge\n", + " sqlite 3.48.0 h9eae976_1 conda-forge\n", + " stack_data 0.6.3 pyhd8ed1ab_1 conda-forge\n", + " tblib 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " tk 8.6.13 noxft_h4845f30_101 conda-forge\n", + " toolz 1.0.0 pyhd8ed1ab_1 conda-forge\n", + " tornado 6.4.2 py312h66e93f0_0 conda-forge\n", + " traitlets 5.14.3 pyhd8ed1ab_1 conda-forge\n", + " typing_extensions 4.12.2 pyha770c72_1 conda-forge\n", + " tzdata 2025a h78e105d_0 conda-forge\n", + " urllib3 2.3.0 pyhd8ed1ab_0 conda-forge\n", + " wcwidth 0.2.13 pyhd8ed1ab_1 conda-forge\n", + " wheel 0.45.1 pyhd8ed1ab_1 conda-forge\n", + " wrapt 1.17.2 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mxarray \u001b[0m 2025.1.2 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mxgrads \u001b[0m 0.2.6 pyhd8ed1ab_1 conda-forge\n", + " xorg-libxau 1.0.12 hb9d3cd8_0 conda-forge\n", + " xorg-libxdmcp 1.1.5 hb9d3cd8_0 conda-forge\n", + " xyzservices 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " xz 5.6.4 hbcc6ac9_0 conda-forge\n", + " xz-gpl-tools 5.6.4 hbcc6ac9_0 conda-forge\n", + " xz-tools 5.6.4 hb9d3cd8_0 conda-forge\n", + " yaml 0.2.5 h7f98852_2 conda-forge\n", + " \u001b[1m\u001b[34mzarr \u001b[0m 3.0.2 pyhd8ed1ab_0 conda-forge\n", + " zict 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " zipp 3.21.0 pyhd8ed1ab_1 conda-forge\n", + " zlib 1.3.1 hb9d3cd8_2 conda-forge\n", + " zstandard 0.23.0 py312hef9b889_1 conda-forge\n", + " zstd 1.5.6 ha6fb4c9_0 conda-forge\n" ] } ], "source": [ "# Check What is installed inside your environment\n", - "!conda list -p /home/spack/envs/test" + "!micromamba list -n modern" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "id": "08bcab6f-7056-44ea-8363-af7718c4dd3d", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# Export the definition (versions, packages) to a YAML file\n", - "!conda env export -p /home/spack/envs/test > environment.yaml" + "!micromamba env export -n modern > environment.yaml" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "id": "4ec66832-8a9a-446e-ae4a-7de85fad29d7", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "name: null\n", + "name: modern\n", "channels:\n", - " - defaults\n", + " - conda-forge\n", "dependencies:\n", - " - _libgcc_mutex=0.1=main\n", - " - _openmp_mutex=4.5=1_gnu\n", - " - ca-certificates=2021.9.30=h06a4308_1\n", - " - certifi=2021.10.8=py39h06a4308_0\n", - " - ld_impl_linux-64=2.35.1=h7274673_9\n", - " - libffi=3.3=he6710b0_2\n", - " - libgcc-ng=9.3.0=h5101ec6_17\n", - " - libgomp=9.3.0=h5101ec6_17\n", - " - libstdcxx-ng=9.3.0=hd4cf53a_17\n", - " - ncurses=6.2=he6710b0_1\n", - " - openssl=1.1.1l=h7f8727e_0\n", - " - pip=21.2.4=py39h06a4308_0\n", - " - python=3.9.7=h12debd9_1\n", - " - readline=8.1=h27cfd23_0\n", - " - setuptools=58.0.4=py39h06a4308_0\n", - " - sqlite=3.36.0=hc218d9a_0\n", - " - tk=8.6.11=h1ccaba5_0\n", - " - tzdata=2021a=h5d7bf9c_0\n", - " - wheel=0.37.0=pyhd3eb1b0_1\n", - " - xz=5.2.5=h7b6447c_0\n", - " - zlib=1.2.11=h7b6447c_3\n", - "prefix: /home/spack/envs/test\n", - "\n" + " - _libgcc_mutex=0.1=conda_forge\n", + " - _openmp_mutex=4.5=2_gnu\n", + " - asttokens=3.0.0=pyhd8ed1ab_1\n", + " - aws-c-auth=0.8.1=h205f482_0\n", + " - aws-c-cal=0.8.1=h1a47875_3\n", + " - aws-c-common=0.10.6=hb9d3cd8_0\n", + " - aws-c-compression=0.3.0=h4e1184b_5\n", + " - aws-c-event-stream=0.5.0=h7959bf6_11\n", + " - aws-c-http=0.9.2=hefd7a92_4\n", + " - aws-c-io=0.15.3=h173a860_6\n", + " - aws-c-mqtt=0.11.0=h11f4f37_12\n", + " - aws-c-s3=0.7.9=he1b24dc_1\n", + " - aws-c-sdkutils=0.2.2=h4e1184b_0\n", + " - aws-checksums=0.2.2=h4e1184b_4\n", + " - aws-crt-cpp=0.29.9=he0e7f3f_2\n", + " - aws-sdk-cpp=1.11.489=h4d475cb_0\n", + " - azure-core-cpp=1.14.0=h5cfcd09_0\n", + " - azure-identity-cpp=1.10.0=h113e628_0\n", + " - azure-storage-blobs-cpp=12.13.0=h3cf044e_1\n", + " - azure-storage-common-cpp=12.8.0=h736e048_1\n", + " - azure-storage-files-datalake-cpp=12.12.0=ha633028_1\n", + " - bokeh=3.6.3=pyhd8ed1ab_0\n", + " - brotli-python=1.1.0=py312h2ec8cdc_2\n", + " - bzip2=1.0.8=h4bc722e_7\n", + " - c-ares=1.34.4=hb9d3cd8_0\n", + " - ca-certificates=2025.1.31=hbcca054_0\n", + " - certifi=2024.12.14=pyhd8ed1ab_0\n", + " - cffi=1.17.1=py312h06ac9bb_0\n", + " - click=8.1.8=pyh707e725_0\n", + " - cloudpickle=3.1.1=pyhd8ed1ab_0\n", + " - contourpy=1.3.1=py312h68727a3_0\n", + " - crc32c=2.7.1=py312h66e93f0_0\n", + " - cytoolz=1.0.1=py312h66e93f0_0\n", + " - dask=2025.1.0=pyhd8ed1ab_0\n", + " - dask-core=2025.1.0=pyhd8ed1ab_0\n", + " - decorator=5.1.1=pyhd8ed1ab_1\n", + " - deprecated=1.2.18=pyhd8ed1ab_0\n", + " - distributed=2025.1.0=pyhd8ed1ab_0\n", + " - donfig=0.8.1.post1=pyhd8ed1ab_1\n", + " - exceptiongroup=1.2.2=pyhd8ed1ab_1\n", + " - executing=2.1.0=pyhd8ed1ab_1\n", + " - freetype=2.12.1=h267a509_2\n", + " - fsspec=2025.2.0=pyhd8ed1ab_0\n", + " - gflags=2.2.2=h5888daf_1005\n", + " - glog=0.7.1=hbabe93e_0\n", + " - h2=4.2.0=pyhd8ed1ab_0\n", + " - hpack=4.1.0=pyhd8ed1ab_0\n", + " - hyperframe=6.1.0=pyhd8ed1ab_0\n", + " - importlib-metadata=8.6.1=pyha770c72_0\n", + " - ipython=8.32.0=pyh907856f_0\n", + " - jedi=0.19.2=pyhd8ed1ab_1\n", + " - jinja2=3.1.5=pyhd8ed1ab_0\n", + " - keyutils=1.6.1=h166bdaf_0\n", + " - krb5=1.21.3=h659f571_0\n", + " - lcms2=2.17=h717163a_0\n", + " - ld_impl_linux-64=2.43=h712a8e2_2\n", + " - lerc=4.0.0=h27087fc_0\n", + " - libabseil=20240722.0=cxx17_hbbce691_4\n", + " - libarrow=19.0.0=h00a82cf_8_cpu\n", + " - libarrow-acero=19.0.0=hcb10f89_8_cpu\n", + " - libarrow-dataset=19.0.0=hcb10f89_8_cpu\n", + " - libarrow-substrait=19.0.0=h08228c5_8_cpu\n", + " - libblas=3.9.0=28_h59b9bed_openblas\n", + " - libbrotlicommon=1.1.0=hb9d3cd8_2\n", + " - libbrotlidec=1.1.0=hb9d3cd8_2\n", + " - libbrotlienc=1.1.0=hb9d3cd8_2\n", + " - libcblas=3.9.0=28_he106b2a_openblas\n", + " - libcrc32c=1.1.2=h9c3ff4c_0\n", + " - libcurl=8.11.1=h332b0f4_0\n", + " - libdeflate=1.23=h4ddbbb0_0\n", + " - libedit=3.1.20250104=pl5321h7949ede_0\n", + " - libev=4.33=hd590300_2\n", + " - libevent=2.1.12=hf998b51_1\n", + " - libexpat=2.6.4=h5888daf_0\n", + " - libffi=3.4.2=h7f98852_5\n", + " - libgcc=14.2.0=h77fa898_1\n", + " - libgcc-ng=14.2.0=h69a702a_1\n", + " - libgfortran=14.2.0=h69a702a_1\n", + " - libgfortran5=14.2.0=hd5240d6_1\n", + " - libgomp=14.2.0=h77fa898_1\n", + " - libgoogle-cloud=2.34.0=h2b5623c_0\n", + " - libgoogle-cloud-storage=2.34.0=h0121fbd_0\n", + " - libgrpc=1.67.1=h25350d4_1\n", + " - libiconv=1.17=hd590300_2\n", + " - libjpeg-turbo=3.0.0=hd590300_1\n", + " - liblapack=3.9.0=28_h7ac8fdf_openblas\n", + " - libllvm15=15.0.7=hb3ce162_4\n", + " - liblzma=5.6.4=hb9d3cd8_0\n", + " - liblzma-devel=5.6.4=hb9d3cd8_0\n", + " - libnghttp2=1.64.0=h161d5f1_0\n", + " - libnsl=2.0.1=hd590300_0\n", + " - libopenblas=0.3.28=pthreads_h94d23a6_1\n", + " - libopentelemetry-cpp=1.18.0=hfcad708_1\n", + " - libopentelemetry-cpp-headers=1.18.0=ha770c72_1\n", + " - libparquet=19.0.0=h081d1f1_8_cpu\n", + " - libpng=1.6.46=h943b412_0\n", + " - libprotobuf=5.28.3=h6128344_1\n", + " - libre2-11=2024.07.02=hbbce691_2\n", + " - libsqlite=3.48.0=hee588c1_1\n", + " - libssh2=1.11.1=hf672d98_0\n", + " - libstdcxx=14.2.0=hc0a3c3a_1\n", + " - libstdcxx-ng=14.2.0=h4852527_1\n", + " - libthrift=0.21.0=h0e7cc3e_0\n", + " - libtiff=4.7.0=hd9ff511_3\n", + " - libutf8proc=2.10.0=h4c51ac1_0\n", + " - libuuid=2.38.1=h0b41bf4_0\n", + " - libwebp-base=1.5.0=h851e524_0\n", + " - libxcb=1.17.0=h8a09558_0\n", + " - libxml2=2.13.5=h0d44e9d_1\n", + " - libzlib=1.3.1=hb9d3cd8_2\n", + " - llvmlite=0.44.0=py312h374181b_0\n", + " - locket=1.0.0=pyhd8ed1ab_0\n", + " - lz4=4.3.3=py312hf0f0c11_2\n", + " - lz4-c=1.10.0=h5888daf_1\n", + " - markupsafe=3.0.2=py312h178313f_1\n", + " - matplotlib-inline=0.1.7=pyhd8ed1ab_1\n", + " - msgpack-python=1.1.0=py312h68727a3_0\n", + " - ncurses=6.5=h2d0b736_3\n", + " - nlohmann_json=3.11.3=he02047a_1\n", + " - numba=0.61.0=py312h2e6246c_1\n", + " - numcodecs=0.15.0=py312hf9745cd_0\n", + " - numpy=2.1.3=py312h58c1407_0\n", + " - openjpeg=2.5.3=h5fbd93e_0\n", + " - openssl=3.4.0=h7b32b05_1\n", + " - orc=2.0.3=h12ee42a_2\n", + " - packaging=24.2=pyhd8ed1ab_2\n", + " - pandas=2.2.3=py312hf9745cd_1\n", + " - parso=0.8.4=pyhd8ed1ab_1\n", + " - partd=1.4.2=pyhd8ed1ab_0\n", + " - pexpect=4.9.0=pyhd8ed1ab_1\n", + " - pickleshare=0.7.5=pyhd8ed1ab_1004\n", + " - pillow=11.1.0=py312h80c1187_0\n", + " - pip=25.0.1=pyh8b19718_0\n", + " - proj=9.5.1=h0054346_0\n", + " - prometheus-cpp=1.3.0=ha5d0236_0\n", + " - prompt-toolkit=3.0.50=pyha770c72_0\n", + " - psutil=6.1.1=py312h66e93f0_0\n", + " - pthread-stubs=0.4=hb9d3cd8_1002\n", + " - ptyprocess=0.7.0=pyhd8ed1ab_1\n", + " - pure_eval=0.2.3=pyhd8ed1ab_1\n", + " - pyarrow=19.0.0=py312h7900ff3_0\n", + " - pyarrow-core=19.0.0=py312h01725c0_0_cpu\n", + " - pycparser=2.22=pyh29332c3_1\n", + " - pygments=2.19.1=pyhd8ed1ab_0\n", + " - pyproj=3.7.0=py312he630544_0\n", + " - pysocks=1.7.1=pyha55dd90_7\n", + " - python=3.12.0=hab00c5b_0_cpython\n", + " - python-dateutil=2.9.0.post0=pyhff2d567_1\n", + " - python-tzdata=2025.1=pyhd8ed1ab_0\n", + " - python_abi=3.12=5_cp312\n", + " - pytz=2024.1=pyhd8ed1ab_0\n", + " - pyyaml=6.0.2=py312h178313f_2\n", + " - re2=2024.07.02=h9925aae_2\n", + " - readline=8.2=h8228510_1\n", + " - s2n=1.5.11=h072c03f_0\n", + " - setuptools=75.8.0=pyhff2d567_0\n", + " - six=1.17.0=pyhd8ed1ab_0\n", + " - snappy=1.2.1=h8bd8927_1\n", + " - sortedcontainers=2.4.0=pyhd8ed1ab_1\n", + " - sqlite=3.48.0=h9eae976_1\n", + " - stack_data=0.6.3=pyhd8ed1ab_1\n", + " - tblib=3.0.0=pyhd8ed1ab_1\n", + " - tk=8.6.13=noxft_h4845f30_101\n", + " - toolz=1.0.0=pyhd8ed1ab_1\n", + " - tornado=6.4.2=py312h66e93f0_0\n", + " - traitlets=5.14.3=pyhd8ed1ab_1\n", + " - typing_extensions=4.12.2=pyha770c72_1\n", + " - tzdata=2025a=h78e105d_0\n", + " - urllib3=2.3.0=pyhd8ed1ab_0\n", + " - wcwidth=0.2.13=pyhd8ed1ab_1\n", + " - wheel=0.45.1=pyhd8ed1ab_1\n", + " - wrapt=1.17.2=py312h66e93f0_0\n", + " - xarray=2025.1.2=pyhd8ed1ab_0\n", + " - xgrads=0.2.6=pyhd8ed1ab_1\n", + " - xorg-libxau=1.0.12=hb9d3cd8_0\n", + " - xorg-libxdmcp=1.1.5=hb9d3cd8_0\n", + " - xyzservices=2025.1.0=pyhd8ed1ab_0\n", + " - xz=5.6.4=hbcc6ac9_0\n", + " - xz-gpl-tools=5.6.4=hbcc6ac9_0\n", + " - xz-tools=5.6.4=hb9d3cd8_0\n", + " - yaml=0.2.5=h7f98852_2\n", + " - zarr=3.0.2=pyhd8ed1ab_0\n", + " - zict=3.0.0=pyhd8ed1ab_1\n", + " - zipp=3.21.0=pyhd8ed1ab_1\n", + " - zlib=1.3.1=hb9d3cd8_2\n", + " - zstandard=0.23.0=py312hef9b889_1\n", + " - zstd=1.5.6=ha6fb4c9_0\n", + "\n", + "prefix: \"/jetfs/home/yourusername/micromamba/envs/modern\"\n" ] } ], @@ -198,12 +533,14 @@ "\n", "With that file you will be able to rebuild this environment at anytime.\n", "\n", + "## Backup with pip\n", + "\n", "If you want to use `pip` later to restore your environment, you can use\n", "```bash\n", "./envs/test/bin/pip list format=freeze > requirements.txt\n", "```\n", "\n", - "However, this is quite different from conda. You need to have the **correct version of python** available otherwise you can not restore the environment." + "However, this is quite different from conda/micromamba. You need to have the **correct version of python** available otherwise you can not restore the environment." ] }, { @@ -213,136 +550,262 @@ "source": [ "## Restore\n", "\n", - "Maybe you get a environment file from a colleague or it's your backup, there are ways to restore your environment.\n", - "\n", - "Please note that conda is slow and resolving dependencies can be slow." + "Maybe you get a environment file from a colleague or it's your backup, there are ways to restore your environment." ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 7, "id": "04145eb1-b368-405e-898c-1694f485b57c", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting package metadata (repodata.json): done\n", - "Solving environment: done\n", - "\n", - "\n", - "==> WARNING: A newer version of conda exists. <==\n", - " current version: 4.8.3\n", - " latest version: 4.10.3\n", - "\n", - "Please update conda by running\n", - "\n", - " $ conda update -n base -c defaults conda\n", - "\n", - "\n", - "Preparing transaction: done\n", - "Verifying transaction: done\n", - "Executing transaction: done\n", - "#\n", - "# To activate this environment, use\n", - "#\n", - "# $ conda activate /home/spack/envs/restore\n", - "#\n", - "# To deactivate an active environment, use\n", - "#\n", - "# $ conda deactivate\n", - "\n" - ] - } - ], + "metadata": { + "tags": [] + }, + "outputs": [], "source": [ "# Create the environment in a special path\n", - "!conda env create -p /home/spack/envs/restore -f environment.yaml" + "# -y yes to questions\n", + "# -q quiet\n", + "!micromamba env create -y -q -n modern2 -f environment.yaml\n", + "# this can take some time to finish." ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 8, "id": "72e85fe7-ed74-4f1c-974b-b328533b52a0", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "# conda environments:\n", - "#\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-l2bohj4adsd6r2oweeytdzrgqmjl64lt\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-5qezliv3bkrc63cv2zk2lyh3xioozd45\n", - " /home/spack-root/opt/spack/linux-centos8-skylake_avx512/gcc-8.3.1/miniconda3-4.9.2-htox4jjktvvm7b4d3rfwpwpwa4i2kkhk\n", - " /home/spack/envs/restore\n", - " /home/spack/envs/test\n", - " /home/swd/anaconda3\n", - " /home/swd/manual/intelpython/intelpython/latest\n", - " /home/swd/manual/intelpython/intelpython/latest/envs/2021.4.0\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda2-2019.10-eaw5h5kknfwa3bsjnjhqfhytzfxgd3nf\n", - "base * /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.07-4onhdcbnvyvwfdxxbelrplxjihjsknex\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2020.11-v46okvjlotnor7yrmpqnbn63xt3a2qyq\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/anaconda3-2021.05-hrg2ocjseksc4af3osaiipzu433xctef\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/miniconda2-4.7.12.1-3r6cvxekrhf32f6tdeout3aq7xxsgjit\n", - " /home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.4.1/miniconda3-4.10.3-l23y36yispi4ue5w7mhyc4mllio4ylfm\n", - "\n" + " Name Active Path \n", + "─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n", + " base * /jetfs/home/yourusername/micromamba \n", + " modern /jetfs/home/yourusername/micromamba/envs/modern \n", + " modern2 /jetfs/home/yourusername/micromamba/envs/modern2 \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda2-2019.10-5pou6jiel7heivyyjwlgwcyltniipjlp \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2019.10-tmy5mgp3gzy7uqkouhm33gfyp3p3xpsu \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-weugqkfkxd6zmn2irm7lpmujzczwebiw \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda2-4.7.12.1-zduqggvbh63zrdghrlty4ncwiclobaja\n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv \n" ] } ], "source": [ - "!conda env list" - ] - }, - { - "cell_type": "markdown", - "id": "1ffa23fe-1b8c-45af-9547-6295edcec219", - "metadata": {}, - "source": [ - "Please note that we have another environment like this, called restore:\n", - "`/home/spack/envs/restore`" + "!micromamba env list" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 9, "id": "45e09ec6-6670-4dc0-bef1-3dcc1e6504ec", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "# packages in environment at /home/spack/envs/restore:\n", - "#\n", - "# Name Version Build Channel\n", - "_libgcc_mutex 0.1 main \n", - "_openmp_mutex 4.5 1_gnu \n", - "ca-certificates 2021.9.30 h06a4308_1 \n", - "certifi 2021.10.8 py39h06a4308_0 \n", - "ld_impl_linux-64 2.35.1 h7274673_9 \n", - "libffi 3.3 he6710b0_2 \n", - "libgcc-ng 9.3.0 h5101ec6_17 \n", - "libgomp 9.3.0 h5101ec6_17 \n", - "libstdcxx-ng 9.3.0 hd4cf53a_17 \n", - "ncurses 6.2 he6710b0_1 \n", - "openssl 1.1.1l h7f8727e_0 \n", - "pip 21.2.4 py39h06a4308_0 \n", - "python 3.9.7 h12debd9_1 \n", - "readline 8.1 h27cfd23_0 \n", - "setuptools 58.0.4 py39h06a4308_0 \n", - "sqlite 3.36.0 hc218d9a_0 \n", - "tk 8.6.11 h1ccaba5_0 \n", - "tzdata 2021a h5d7bf9c_0 \n", - "wheel 0.37.0 pyhd3eb1b0_1 \n", - "xz 5.2.5 h7b6447c_0 \n", - "zlib 1.2.11 h7b6447c_3 \n" + "List of packages in environment: \"/jetfs/home/yourusername/micromamba/envs/modern2\"\n", + "\n", + " Name Version Build Channel \n", + "─────────────────────────────────────────────────────────────────────────────────────\n", + " \u001b[1m\u001b[34m_libgcc_mutex \u001b[0m 0.1 conda_forge conda-forge\n", + " \u001b[1m\u001b[34m_openmp_mutex \u001b[0m 4.5 2_gnu conda-forge\n", + " \u001b[1m\u001b[34masttokens \u001b[0m 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34maws-c-auth \u001b[0m 0.8.1 h205f482_0 conda-forge\n", + " \u001b[1m\u001b[34maws-c-cal \u001b[0m 0.8.1 h1a47875_3 conda-forge\n", + " \u001b[1m\u001b[34maws-c-common \u001b[0m 0.10.6 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34maws-c-compression \u001b[0m 0.3.0 h4e1184b_5 conda-forge\n", + " \u001b[1m\u001b[34maws-c-event-stream \u001b[0m 0.5.0 h7959bf6_11 conda-forge\n", + " \u001b[1m\u001b[34maws-c-http \u001b[0m 0.9.2 hefd7a92_4 conda-forge\n", + " \u001b[1m\u001b[34maws-c-io \u001b[0m 0.15.3 h173a860_6 conda-forge\n", + " \u001b[1m\u001b[34maws-c-mqtt \u001b[0m 0.11.0 h11f4f37_12 conda-forge\n", + " \u001b[1m\u001b[34maws-c-s3 \u001b[0m 0.7.9 he1b24dc_1 conda-forge\n", + " \u001b[1m\u001b[34maws-c-sdkutils \u001b[0m 0.2.2 h4e1184b_0 conda-forge\n", + " \u001b[1m\u001b[34maws-checksums \u001b[0m 0.2.2 h4e1184b_4 conda-forge\n", + " \u001b[1m\u001b[34maws-crt-cpp \u001b[0m 0.29.9 he0e7f3f_2 conda-forge\n", + " \u001b[1m\u001b[34maws-sdk-cpp \u001b[0m 1.11.489 h4d475cb_0 conda-forge\n", + " \u001b[1m\u001b[34mazure-core-cpp \u001b[0m 1.14.0 h5cfcd09_0 conda-forge\n", + " \u001b[1m\u001b[34mazure-identity-cpp \u001b[0m 1.10.0 h113e628_0 conda-forge\n", + " \u001b[1m\u001b[34mazure-storage-blobs-cpp \u001b[0m 12.13.0 h3cf044e_1 conda-forge\n", + " \u001b[1m\u001b[34mazure-storage-common-cpp \u001b[0m 12.8.0 h736e048_1 conda-forge\n", + " \u001b[1m\u001b[34mazure-storage-files-datalake-cpp\u001b[0m 12.12.0 ha633028_1 conda-forge\n", + " \u001b[1m\u001b[34mbokeh \u001b[0m 3.6.3 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mbrotli-python \u001b[0m 1.1.0 py312h2ec8cdc_2 conda-forge\n", + " \u001b[1m\u001b[34mbzip2 \u001b[0m 1.0.8 h4bc722e_7 conda-forge\n", + " \u001b[1m\u001b[34mc-ares \u001b[0m 1.34.4 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34mca-certificates \u001b[0m 2025.1.31 hbcca054_0 conda-forge\n", + " \u001b[1m\u001b[34mcertifi \u001b[0m 2024.12.14 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mcffi \u001b[0m 1.17.1 py312h06ac9bb_0 conda-forge\n", + " \u001b[1m\u001b[34mclick \u001b[0m 8.1.8 pyh707e725_0 conda-forge\n", + " \u001b[1m\u001b[34mcloudpickle \u001b[0m 3.1.1 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mcontourpy \u001b[0m 1.3.1 py312h68727a3_0 conda-forge\n", + " \u001b[1m\u001b[34mcrc32c \u001b[0m 2.7.1 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mcytoolz \u001b[0m 1.0.1 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mdask \u001b[0m 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mdask-core \u001b[0m 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mdecorator \u001b[0m 5.1.1 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mdeprecated \u001b[0m 1.2.18 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mdistributed \u001b[0m 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mdonfig \u001b[0m 0.8.1.post1 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mexceptiongroup \u001b[0m 1.2.2 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mexecuting \u001b[0m 2.1.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mfreetype \u001b[0m 2.12.1 h267a509_2 conda-forge\n", + " \u001b[1m\u001b[34mfsspec \u001b[0m 2025.2.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mgflags \u001b[0m 2.2.2 h5888daf_1005 conda-forge\n", + " \u001b[1m\u001b[34mglog \u001b[0m 0.7.1 hbabe93e_0 conda-forge\n", + " \u001b[1m\u001b[34mh2 \u001b[0m 4.2.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mhpack \u001b[0m 4.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mhyperframe \u001b[0m 6.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mimportlib-metadata \u001b[0m 8.6.1 pyha770c72_0 conda-forge\n", + " \u001b[1m\u001b[34mipython \u001b[0m 8.32.0 pyh907856f_0 conda-forge\n", + " \u001b[1m\u001b[34mjedi \u001b[0m 0.19.2 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mjinja2 \u001b[0m 3.1.5 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mkeyutils \u001b[0m 1.6.1 h166bdaf_0 conda-forge\n", + " \u001b[1m\u001b[34mkrb5 \u001b[0m 1.21.3 h659f571_0 conda-forge\n", + " \u001b[1m\u001b[34mlcms2 \u001b[0m 2.17 h717163a_0 conda-forge\n", + " \u001b[1m\u001b[34mld_impl_linux-64 \u001b[0m 2.43 h712a8e2_2 conda-forge\n", + " \u001b[1m\u001b[34mlerc \u001b[0m 4.0.0 h27087fc_0 conda-forge\n", + " \u001b[1m\u001b[34mlibabseil \u001b[0m 20240722.0 cxx17_hbbce691_4 conda-forge\n", + " \u001b[1m\u001b[34mlibarrow \u001b[0m 19.0.0 h00a82cf_8_cpu conda-forge\n", + " \u001b[1m\u001b[34mlibarrow-acero \u001b[0m 19.0.0 hcb10f89_8_cpu conda-forge\n", + " \u001b[1m\u001b[34mlibarrow-dataset \u001b[0m 19.0.0 hcb10f89_8_cpu conda-forge\n", + " \u001b[1m\u001b[34mlibarrow-substrait \u001b[0m 19.0.0 h08228c5_8_cpu conda-forge\n", + " \u001b[1m\u001b[34mlibblas \u001b[0m 3.9.0 28_h59b9bed_openblas conda-forge\n", + " \u001b[1m\u001b[34mlibbrotlicommon \u001b[0m 1.1.0 hb9d3cd8_2 conda-forge\n", + " \u001b[1m\u001b[34mlibbrotlidec \u001b[0m 1.1.0 hb9d3cd8_2 conda-forge\n", + " \u001b[1m\u001b[34mlibbrotlienc \u001b[0m 1.1.0 hb9d3cd8_2 conda-forge\n", + " \u001b[1m\u001b[34mlibcblas \u001b[0m 3.9.0 28_he106b2a_openblas conda-forge\n", + " \u001b[1m\u001b[34mlibcrc32c \u001b[0m 1.1.2 h9c3ff4c_0 conda-forge\n", + " \u001b[1m\u001b[34mlibcurl \u001b[0m 8.11.1 h332b0f4_0 conda-forge\n", + " \u001b[1m\u001b[34mlibdeflate \u001b[0m 1.23 h4ddbbb0_0 conda-forge\n", + " \u001b[1m\u001b[34mlibedit \u001b[0m 3.1.20250104 pl5321h7949ede_0 conda-forge\n", + " \u001b[1m\u001b[34mlibev \u001b[0m 4.33 hd590300_2 conda-forge\n", + " \u001b[1m\u001b[34mlibevent \u001b[0m 2.1.12 hf998b51_1 conda-forge\n", + " \u001b[1m\u001b[34mlibexpat \u001b[0m 2.6.4 h5888daf_0 conda-forge\n", + " \u001b[1m\u001b[34mlibffi \u001b[0m 3.4.2 h7f98852_5 conda-forge\n", + " \u001b[1m\u001b[34mlibgcc \u001b[0m 14.2.0 h77fa898_1 conda-forge\n", + " \u001b[1m\u001b[34mlibgcc-ng \u001b[0m 14.2.0 h69a702a_1 conda-forge\n", + " \u001b[1m\u001b[34mlibgfortran \u001b[0m 14.2.0 h69a702a_1 conda-forge\n", + " \u001b[1m\u001b[34mlibgfortran5 \u001b[0m 14.2.0 hd5240d6_1 conda-forge\n", + " \u001b[1m\u001b[34mlibgomp \u001b[0m 14.2.0 h77fa898_1 conda-forge\n", + " \u001b[1m\u001b[34mlibgoogle-cloud \u001b[0m 2.34.0 h2b5623c_0 conda-forge\n", + " \u001b[1m\u001b[34mlibgoogle-cloud-storage \u001b[0m 2.34.0 h0121fbd_0 conda-forge\n", + " \u001b[1m\u001b[34mlibgrpc \u001b[0m 1.67.1 h25350d4_1 conda-forge\n", + " \u001b[1m\u001b[34mlibiconv \u001b[0m 1.17 hd590300_2 conda-forge\n", + " \u001b[1m\u001b[34mlibjpeg-turbo \u001b[0m 3.0.0 hd590300_1 conda-forge\n", + " \u001b[1m\u001b[34mliblapack \u001b[0m 3.9.0 28_h7ac8fdf_openblas conda-forge\n", + " \u001b[1m\u001b[34mlibllvm15 \u001b[0m 15.0.7 hb3ce162_4 conda-forge\n", + " \u001b[1m\u001b[34mliblzma \u001b[0m 5.6.4 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34mliblzma-devel \u001b[0m 5.6.4 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34mlibnghttp2 \u001b[0m 1.64.0 h161d5f1_0 conda-forge\n", + " \u001b[1m\u001b[34mlibnsl \u001b[0m 2.0.1 hd590300_0 conda-forge\n", + " \u001b[1m\u001b[34mlibopenblas \u001b[0m 0.3.28 pthreads_h94d23a6_1 conda-forge\n", + " \u001b[1m\u001b[34mlibopentelemetry-cpp \u001b[0m 1.18.0 hfcad708_1 conda-forge\n", + " \u001b[1m\u001b[34mlibopentelemetry-cpp-headers \u001b[0m 1.18.0 ha770c72_1 conda-forge\n", + " \u001b[1m\u001b[34mlibparquet \u001b[0m 19.0.0 h081d1f1_8_cpu conda-forge\n", + " \u001b[1m\u001b[34mlibpng \u001b[0m 1.6.46 h943b412_0 conda-forge\n", + " \u001b[1m\u001b[34mlibprotobuf \u001b[0m 5.28.3 h6128344_1 conda-forge\n", + " \u001b[1m\u001b[34mlibre2-11 \u001b[0m 2024.07.02 hbbce691_2 conda-forge\n", + " \u001b[1m\u001b[34mlibsqlite \u001b[0m 3.48.0 hee588c1_1 conda-forge\n", + " \u001b[1m\u001b[34mlibssh2 \u001b[0m 1.11.1 hf672d98_0 conda-forge\n", + " \u001b[1m\u001b[34mlibstdcxx \u001b[0m 14.2.0 hc0a3c3a_1 conda-forge\n", + " \u001b[1m\u001b[34mlibstdcxx-ng \u001b[0m 14.2.0 h4852527_1 conda-forge\n", + " \u001b[1m\u001b[34mlibthrift \u001b[0m 0.21.0 h0e7cc3e_0 conda-forge\n", + " \u001b[1m\u001b[34mlibtiff \u001b[0m 4.7.0 hd9ff511_3 conda-forge\n", + " \u001b[1m\u001b[34mlibutf8proc \u001b[0m 2.10.0 h4c51ac1_0 conda-forge\n", + " \u001b[1m\u001b[34mlibuuid \u001b[0m 2.38.1 h0b41bf4_0 conda-forge\n", + " \u001b[1m\u001b[34mlibwebp-base \u001b[0m 1.5.0 h851e524_0 conda-forge\n", + " \u001b[1m\u001b[34mlibxcb \u001b[0m 1.17.0 h8a09558_0 conda-forge\n", + " \u001b[1m\u001b[34mlibxml2 \u001b[0m 2.13.5 h0d44e9d_1 conda-forge\n", + " \u001b[1m\u001b[34mlibzlib \u001b[0m 1.3.1 hb9d3cd8_2 conda-forge\n", + " \u001b[1m\u001b[34mllvmlite \u001b[0m 0.44.0 py312h374181b_0 conda-forge\n", + " \u001b[1m\u001b[34mlocket \u001b[0m 1.0.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mlz4 \u001b[0m 4.3.3 py312hf0f0c11_2 conda-forge\n", + " \u001b[1m\u001b[34mlz4-c \u001b[0m 1.10.0 h5888daf_1 conda-forge\n", + " \u001b[1m\u001b[34mmarkupsafe \u001b[0m 3.0.2 py312h178313f_1 conda-forge\n", + " \u001b[1m\u001b[34mmatplotlib-inline \u001b[0m 0.1.7 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mmsgpack-python \u001b[0m 1.1.0 py312h68727a3_0 conda-forge\n", + " \u001b[1m\u001b[34mncurses \u001b[0m 6.5 h2d0b736_3 conda-forge\n", + " \u001b[1m\u001b[34mnlohmann_json \u001b[0m 3.11.3 he02047a_1 conda-forge\n", + " \u001b[1m\u001b[34mnumba \u001b[0m 0.61.0 py312h2e6246c_1 conda-forge\n", + " \u001b[1m\u001b[34mnumcodecs \u001b[0m 0.15.0 py312hf9745cd_0 conda-forge\n", + " \u001b[1m\u001b[34mnumpy \u001b[0m 2.1.3 py312h58c1407_0 conda-forge\n", + " \u001b[1m\u001b[34mopenjpeg \u001b[0m 2.5.3 h5fbd93e_0 conda-forge\n", + " \u001b[1m\u001b[34mopenssl \u001b[0m 3.4.0 h7b32b05_1 conda-forge\n", + " \u001b[1m\u001b[34morc \u001b[0m 2.0.3 h12ee42a_2 conda-forge\n", + " \u001b[1m\u001b[34mpackaging \u001b[0m 24.2 pyhd8ed1ab_2 conda-forge\n", + " \u001b[1m\u001b[34mpandas \u001b[0m 2.2.3 py312hf9745cd_1 conda-forge\n", + " \u001b[1m\u001b[34mparso \u001b[0m 0.8.4 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mpartd \u001b[0m 1.4.2 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mpexpect \u001b[0m 4.9.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mpickleshare \u001b[0m 0.7.5 pyhd8ed1ab_1004 conda-forge\n", + " \u001b[1m\u001b[34mpillow \u001b[0m 11.1.0 py312h80c1187_0 conda-forge\n", + " \u001b[1m\u001b[34mpip \u001b[0m 25.0.1 pyh8b19718_0 conda-forge\n", + " \u001b[1m\u001b[34mproj \u001b[0m 9.5.1 h0054346_0 conda-forge\n", + " \u001b[1m\u001b[34mprometheus-cpp \u001b[0m 1.3.0 ha5d0236_0 conda-forge\n", + " \u001b[1m\u001b[34mprompt-toolkit \u001b[0m 3.0.50 pyha770c72_0 conda-forge\n", + " \u001b[1m\u001b[34mpsutil \u001b[0m 6.1.1 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mpthread-stubs \u001b[0m 0.4 hb9d3cd8_1002 conda-forge\n", + " \u001b[1m\u001b[34mptyprocess \u001b[0m 0.7.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mpure_eval \u001b[0m 0.2.3 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mpyarrow \u001b[0m 19.0.0 py312h7900ff3_0 conda-forge\n", + " \u001b[1m\u001b[34mpyarrow-core \u001b[0m 19.0.0 py312h01725c0_0_cpu conda-forge\n", + " \u001b[1m\u001b[34mpycparser \u001b[0m 2.22 pyh29332c3_1 conda-forge\n", + " \u001b[1m\u001b[34mpygments \u001b[0m 2.19.1 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mpyproj \u001b[0m 3.7.0 py312he630544_0 conda-forge\n", + " \u001b[1m\u001b[34mpysocks \u001b[0m 1.7.1 pyha55dd90_7 conda-forge\n", + " \u001b[1m\u001b[34mpython \u001b[0m 3.12.0 hab00c5b_0_cpython conda-forge\n", + " \u001b[1m\u001b[34mpython-dateutil \u001b[0m 2.9.0.post0 pyhff2d567_1 conda-forge\n", + " \u001b[1m\u001b[34mpython-tzdata \u001b[0m 2025.1 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mpython_abi \u001b[0m 3.12 5_cp312 conda-forge\n", + " \u001b[1m\u001b[34mpytz \u001b[0m 2024.1 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mpyyaml \u001b[0m 6.0.2 py312h178313f_2 conda-forge\n", + " \u001b[1m\u001b[34mre2 \u001b[0m 2024.07.02 h9925aae_2 conda-forge\n", + " \u001b[1m\u001b[34mreadline \u001b[0m 8.2 h8228510_1 conda-forge\n", + " \u001b[1m\u001b[34ms2n \u001b[0m 1.5.11 h072c03f_0 conda-forge\n", + " \u001b[1m\u001b[34msetuptools \u001b[0m 75.8.0 pyhff2d567_0 conda-forge\n", + " \u001b[1m\u001b[34msix \u001b[0m 1.17.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34msnappy \u001b[0m 1.2.1 h8bd8927_1 conda-forge\n", + " \u001b[1m\u001b[34msortedcontainers \u001b[0m 2.4.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34msqlite \u001b[0m 3.48.0 h9eae976_1 conda-forge\n", + " \u001b[1m\u001b[34mstack_data \u001b[0m 0.6.3 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mtblib \u001b[0m 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mtk \u001b[0m 8.6.13 noxft_h4845f30_101 conda-forge\n", + " \u001b[1m\u001b[34mtoolz \u001b[0m 1.0.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mtornado \u001b[0m 6.4.2 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mtraitlets \u001b[0m 5.14.3 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mtyping_extensions \u001b[0m 4.12.2 pyha770c72_1 conda-forge\n", + " \u001b[1m\u001b[34mtzdata \u001b[0m 2025a h78e105d_0 conda-forge\n", + " \u001b[1m\u001b[34murllib3 \u001b[0m 2.3.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mwcwidth \u001b[0m 0.2.13 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mwheel \u001b[0m 0.45.1 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mwrapt \u001b[0m 1.17.2 py312h66e93f0_0 conda-forge\n", + " \u001b[1m\u001b[34mxarray \u001b[0m 2025.1.2 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mxgrads \u001b[0m 0.2.6 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mxorg-libxau \u001b[0m 1.0.12 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34mxorg-libxdmcp \u001b[0m 1.1.5 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34mxyzservices \u001b[0m 2025.1.0 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mxz \u001b[0m 5.6.4 hbcc6ac9_0 conda-forge\n", + " \u001b[1m\u001b[34mxz-gpl-tools \u001b[0m 5.6.4 hbcc6ac9_0 conda-forge\n", + " \u001b[1m\u001b[34mxz-tools \u001b[0m 5.6.4 hb9d3cd8_0 conda-forge\n", + " \u001b[1m\u001b[34myaml \u001b[0m 0.2.5 h7f98852_2 conda-forge\n", + " \u001b[1m\u001b[34mzarr \u001b[0m 3.0.2 pyhd8ed1ab_0 conda-forge\n", + " \u001b[1m\u001b[34mzict \u001b[0m 3.0.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mzipp \u001b[0m 3.21.0 pyhd8ed1ab_1 conda-forge\n", + " \u001b[1m\u001b[34mzlib \u001b[0m 1.3.1 hb9d3cd8_2 conda-forge\n", + " \u001b[1m\u001b[34mzstandard \u001b[0m 0.23.0 py312hef9b889_1 conda-forge\n", + " \u001b[1m\u001b[34mzstd \u001b[0m 1.5.6 ha6fb4c9_0 conda-forge\n" ] } ], "source": [ - "!conda list -p /home/spack/envs/restore" + "!micromamba list -n modern2" ] }, { @@ -350,7 +813,10 @@ "id": "3c241577-5e41-40d8-9b3e-fd8874118d20", "metadata": {}, "source": [ + "## Restore with pip\n", + "\n", "When you want to use pip to restore the environment:\n", + "\n", "```bash\n", "# create a virtual environment\n", "python3 -m venv env\n", @@ -378,7 +844,7 @@ "source": [ "There are three things you need:\n", "- name\n", - "- channels (mostly conda-forge and defaults)\n", + "- channels (mostly conda-forge)\n", "- dependencies (packages)\n", "\n", "An example yaml file\n", @@ -387,7 +853,6 @@ "name: selfdesigned\n", "channels:\n", "- conda-forge\n", - "- defaults\n", "dependencies:\n", "- numpy\n", "- pandas\n", @@ -401,15 +866,17 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 12, "id": "fe80dc6b-aa2a-40d2-b73e-67acf5b487c2", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Writing design.yaml\n" + "Overwriting design.yaml\n" ] } ], @@ -418,7 +885,6 @@ "name: selfdesigned\n", "channels:\n", "- conda-forge\n", - "- defaults\n", "dependencies:\n", "- numpy\n", "- pandas\n", @@ -429,190 +895,59 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 13, "id": "3d821016-50d6-4696-ac47-06755d57e990", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.\n", - "Collecting package metadata (repodata.json): done\n", - "Solving environment: done\n", - "\n", - "\n", - "==> WARNING: A newer version of conda exists. <==\n", - " current version: 4.8.3\n", - " latest version: 4.10.3\n", - "\n", - "Please update conda by running\n", - "\n", - " $ conda update -n base -c defaults conda\n", - "\n", - "\n", - "\n", - "Downloading and Extracting Packages\n", - "pandas-1.3.3 | 13.0 MB | ##################################### | 100% \n", - "numpy-1.21.2 | 6.2 MB | ##################################### | 100% \n", - "ncurses-6.2 | 985 KB | ##################################### | 100% \n", - "libcblas-3.9.0 | 11 KB | ##################################### | 100% \n", - "pytz-2021.3 | 242 KB | ##################################### | 100% \n", - "ld_impl_linux-64-2.3 | 667 KB | ##################################### | 100% \n", - "_libgcc_mutex-0.1 | 3 KB | ##################################### | 100% \n", - "sqlite-3.36.0 | 1.4 MB | ##################################### | 100% \n", - "tk-8.6.11 | 3.3 MB | ##################################### | 100% \n", - "pip-21.3 | 1.2 MB | ##################################### | 100% \n", - "libblas-3.9.0 | 12 KB | ##################################### | 100% \n", - "python_abi-3.9 | 4 KB | ##################################### | 100% \n", - "python-3.9.7 | 27.5 MB | ##################################### | 100% \n", - "tzdata-2021c | 120 KB | ##################################### | 100% \n", - "wheel-0.37.0 | 31 KB | ##################################### | 100% \n", - "libgfortran5-11.2.0 | 1.7 MB | ##################################### | 100% \n", - "zlib-1.2.11 | 86 KB | ##################################### | 100% \n", - "libopenblas-0.3.17 | 9.2 MB | ##################################### | 100% \n", - "libstdcxx-ng-11.2.0 | 4.2 MB | ##################################### | 100% \n", - "libgfortran-ng-11.2. | 19 KB | ##################################### | 100% \n", - "_openmp_mutex-4.5 | 22 KB | ##################################### | 100% \n", - "six-1.16.0 | 14 KB | ##################################### | 100% \n", - "libffi-3.4.2 | 57 KB | ##################################### | 100% \n", - "python-dateutil-2.8. | 240 KB | ##################################### | 100% \n", - "ca-certificates-2021 | 139 KB | ##################################### | 100% \n", - "libgcc-ng-11.2.0 | 887 KB | ##################################### | 100% \n", - "xz-5.2.5 | 343 KB | ##################################### | 100% \n", - "libzlib-1.2.11 | 59 KB | ##################################### | 100% \n", - "xarray-0.19.0 | 614 KB | ##################################### | 100% \n", - "setuptools-58.2.0 | 1011 KB | ##################################### | 100% \n", - "openssl-3.0.0 | 2.9 MB | ##################################### | 100% \n", - "readline-8.1 | 295 KB | ##################################### | 100% \n", - "libgomp-11.2.0 | 427 KB | ##################################### | 100% \n", - "liblapack-3.9.0 | 11 KB | ##################################### | 100% \n", - "Preparing transaction: done\n", - "Verifying transaction: done\n", - "Executing transaction: done\n", - "Ran pip subprocess with arguments:\n", - "['/home/spack/envs/design/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt']\n", - "Pip subprocess output:\n", - "Collecting metpy\n", - " Using cached MetPy-1.1.0-py3-none-any.whl (361 kB)\n", - "Collecting pooch>=0.1\n", - " Using cached pooch-1.5.2-py3-none-any.whl (57 kB)\n", - "Collecting scipy>=1.2.0\n", - " Downloading scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)\n", - "Collecting pint>=0.10.1\n", - " Using cached Pint-0.17-py2.py3-none-any.whl (204 kB)\n", - "Requirement already satisfied: pandas>=0.24.0 in /home/spack/envs/design/lib/python3.9/site-packages (from metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (1.3.3)\n", - "Requirement already satisfied: numpy>=1.17.0 in /home/spack/envs/design/lib/python3.9/site-packages (from metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (1.21.2)\n", - "Collecting matplotlib>=3.0.1\n", - " Downloading matplotlib-3.4.3-cp39-cp39-manylinux1_x86_64.whl (10.3 MB)\n", - "Requirement already satisfied: xarray>=0.14.1 in /home/spack/envs/design/lib/python3.9/site-packages (from metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (0.19.0)\n", - "Collecting traitlets>=4.3.0\n", - " Downloading traitlets-5.1.0-py3-none-any.whl (101 kB)\n", - "Collecting pyproj>=2.3.0\n", - " Downloading pyproj-3.2.1-cp39-cp39-manylinux2010_x86_64.whl (6.3 MB)\n", - "Collecting pyparsing>=2.2.1\n", - " Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\n", - "Collecting kiwisolver>=1.0.1\n", - " Downloading kiwisolver-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)\n", - "Collecting pillow>=6.2.0\n", - " Downloading Pillow-8.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/spack/envs/design/lib/python3.9/site-packages (from matplotlib>=3.0.1->metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (2.8.2)\n", - "Collecting cycler>=0.10\n", - " Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)\n", - "Requirement already satisfied: pytz>=2017.3 in /home/spack/envs/design/lib/python3.9/site-packages (from pandas>=0.24.0->metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (2021.3)\n", - "Collecting packaging\n", - " Using cached packaging-21.0-py3-none-any.whl (40 kB)\n", - "Collecting appdirs\n", - " Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)\n", - "Collecting requests\n", - " Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)\n", - "Collecting certifi\n", - " Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)\n", - "Requirement already satisfied: setuptools>=40.4 in /home/spack/envs/design/lib/python3.9/site-packages (from xarray>=0.14.1->metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (58.2.0)\n", - "Requirement already satisfied: six in /home/spack/envs/design/lib/python3.9/site-packages (from cycler>=0.10->matplotlib>=3.0.1->metpy->-r /home/spack/computer-resources/Python/condaenv.wjxlpjet.requirements.txt (line 1)) (1.16.0)\n", - "Collecting idna<4,>=2.5\n", - " Downloading idna-3.3-py3-none-any.whl (61 kB)\n", - "Collecting charset-normalizer~=2.0.0\n", - " Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB)\n", - "Collecting urllib3<1.27,>=1.21.1\n", - " Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)\n", - "Installing collected packages: urllib3, pyparsing, idna, charset-normalizer, certifi, requests, pillow, packaging, kiwisolver, cycler, appdirs, traitlets, scipy, pyproj, pooch, pint, matplotlib, metpy\n", - "Successfully installed appdirs-1.4.4 certifi-2021.10.8 charset-normalizer-2.0.7 cycler-0.10.0 idna-3.3 kiwisolver-1.3.2 matplotlib-3.4.3 metpy-1.1.0 packaging-21.0 pillow-8.3.2 pint-0.17 pooch-1.5.2 pyparsing-2.4.7 pyproj-3.2.1 requests-2.26.0 scipy-1.7.1 traitlets-5.1.0 urllib3-1.26.7\n", - "\n", - "#\n", - "# To activate this environment, use\n", - "#\n", - "# $ conda activate /home/spack/envs/design\n", - "#\n", - "# To deactivate an active environment, use\n", - "#\n", - "# $ conda deactivate\n", - "\n" + "\u001b[33m\u001b[1mwarning libmamba\u001b[m You are using 'pip' as an additional package manager.\n", + " Be aware that packages installed with 'pip' are managed independently from 'conda-forge' channel.\n" ] } ], "source": [ - "!conda env create -f design.yaml -p /home/spack/envs/design" + "!micromamba env create -q -y -f design.yaml -n selfdesigned" ] }, { "cell_type": "code", - "execution_count": 18, - "id": "c1d727e8-a97f-4809-b695-d10be49e1b4a", - "metadata": {}, + "execution_count": 14, + "id": "75e73b88-3917-4dd4-8e8c-a03070e40b8d", + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Package Version\n", - "------------------ ---------\n", - "appdirs 1.4.4\n", - "certifi 2021.10.8\n", - "charset-normalizer 2.0.7\n", - "cycler 0.10.0\n", - "idna 3.3\n", - "kiwisolver 1.3.2\n", - "matplotlib 3.4.3\n", - "MetPy 1.1.0\n", - "numpy 1.21.2\n", - "packaging 21.0\n", - "pandas 1.3.3\n", - "Pillow 8.3.2\n", - "Pint 0.17\n", - "pip 21.3\n", - "pooch 1.5.2\n", - "pyparsing 2.4.7\n", - "pyproj 3.2.1\n", - "python-dateutil 2.8.2\n", - "pytz 2021.3\n", - "requests 2.26.0\n", - "scipy 1.7.1\n", - "setuptools 58.2.0\n", - "six 1.16.0\n", - "traitlets 5.1.0\n", - "urllib3 1.26.7\n", - "wheel 0.37.0\n", - "xarray 0.19.0\n" + " Name Active Path \n", + "──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n", + " base * /jetfs/home/yourusername/micromamba \n", + " modern /jetfs/home/yourusername/micromamba/envs/modern \n", + " modern2 /jetfs/home/yourusername/micromamba/envs/modern2 \n", + " selfdesigned /jetfs/home/yourusername/micromamba/envs/selfdesigned \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda2-2019.10-5pou6jiel7heivyyjwlgwcyltniipjlp \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2019.10-tmy5mgp3gzy7uqkouhm33gfyp3p3xpsu \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/anaconda3-2020.07-weugqkfkxd6zmn2irm7lpmujzczwebiw \n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda2-4.7.12.1-zduqggvbh63zrdghrlty4ncwiclobaja\n", + " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv \n" ] } ], "source": [ - "!/home/spack/envs/design/bin/pip list" - ] - }, - { - "cell_type": "markdown", - "id": "21a756ab-392b-4238-9272-5494fd8730c8", - "metadata": {}, - "source": [ - "FIN" + "!micromamba env list" ] } ], "metadata": { "kernelspec": { - "display_name": "Miniconda3 (4.10.3) - 3.9.5", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -626,7 +961,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-011-Reading-ODB.ipynb b/Python/QA-011-Reading-ODB.ipynb index 1742cc2542f11836f50c0c0db16eb35cbcc8f516..074b8944e93b6df36d29c09fefa3b0a4ed6bde22 100644 --- a/Python/QA-011-Reading-ODB.ipynb +++ b/Python/QA-011-Reading-ODB.ipynb @@ -145,7 +145,7 @@ "Building wheels for collected packages: pyodc\n", " Building wheel for pyodc (pyproject.toml) ... \u001b[?25ldone\n", "\u001b[?25h Created wheel for pyodc: filename=pyodc-1.3.0-py3-none-any.whl size=29866 sha256=a9e092f59bbe53178efcf5a95a88e4682068f9bb36e4113b529d6615fc9ce488\n", - " Stored in directory: /mnt/users/staff/mblaschek/.cache/pip/wheels/9a/08/f0/7fde07980857fb4bec365d72c929d91d7a512c903ae6847e1c\n", + " Stored in directory: /mnt/users/staff/yourusername/.cache/pip/wheels/9a/08/f0/7fde07980857fb4bec365d72c929d91d7a512c903ae6847e1c\n", "Successfully built pyodc\n", "Installing collected packages: pyodc\n", "Successfully installed pyodc-1.3.0\n" @@ -793,9 +793,9 @@ ], "metadata": { "kernelspec": { - "display_name": "nwp 2023.1 - 3.10", + "display_name": "Python 3 (ipykernel)", "language": "python", - "name": "nwp2023.1" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -807,7 +807,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-012-Mars-Requests.ipynb b/Python/QA-012-Mars-Requests.ipynb index 949d1db28e46202a925f844ddfe77dcc3705e4f5..be0f96bb81374131ca83873ec899d829c9a6583a 100644 --- a/Python/QA-012-Mars-Requests.ipynb +++ b/Python/QA-012-Mars-Requests.ipynb @@ -43,12 +43,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Overwriting /mnt/users/staff/mblaschek/.ecmwfapirc\n" + "Overwriting /mnt/users/staff/yourusername/.ecmwfapirc\n" ] } ], "source": [ - "%%writefile /mnt/users/staff/mmustermann/.ecmwfapirc\n", + "%%writefile ~/.ecmwfapirc\n", "{\n", " \"url\" : \"https://api.ecmwf.int/v1\",\n", " \"key\" : \"1234567890???????\",\n", @@ -251,9 +251,9 @@ ], "metadata": { "kernelspec": { - "display_name": "nwp 2023.1 - 3.10", + "display_name": "Python 3 (ipykernel)", "language": "python", - "name": "nwp2023.1" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -265,7 +265,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-013-Retrieving-ERA5-Magics.ipynb b/Python/QA-013-Retrieving-ERA5-Magics.ipynb index c82cc54fcc2c308e16e0d810a87e5eb5851aef51..92990e02571350b3ba34135096192190d92db2fe 100644 --- a/Python/QA-013-Retrieving-ERA5-Magics.ipynb +++ b/Python/QA-013-Retrieving-ERA5-Magics.ipynb @@ -192,9 +192,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Miniconda3 (4.10.3) - 3.9.5", + "display_name": "Python 3 (ipykernel)", "language": "python", - "name": "miniconda34.10.3-gcc-8.5.0" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -206,7 +206,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/QA-014-VSC-Notebook-Kernels.ipynb b/Python/QA-014-VSC-Notebook-Kernels.ipynb index 93afbc688ac005172ea6343f015b219cca906d3a..bbdadb8386a79c789ffe5214fbe36ec49af670c7 100644 --- a/Python/QA-014-VSC-Notebook-Kernels.ipynb +++ b/Python/QA-014-VSC-Notebook-Kernels.ipynb @@ -78,10 +78,24 @@ } ], "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.0" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Python/README.md b/Python/README.md index d4e5c016da4493a024f9d69423e178d0976bf074..bab09fcd097d9c8998ec30fec4ecb3dc270d4284 100644 --- a/Python/README.md +++ b/Python/README.md @@ -14,6 +14,8 @@ This is a replacement package manager for Python that is independent from a dist [link](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) ```sh title="Conda environment" +# load the module on department servers +module load micromamba # Download and extract just micromamba exe wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj --strip-components=1 bin/micromamba # show @@ -51,18 +53,8 @@ It is recommended to use micromamba, which is way faster than conda. It has a sm ### install packages - There are sometimes different versions available with different build options as well. -```sh title="Conda environment" -# load the minimum module (alternative load anaconda3) -module load miniconda3 -# Create an environment and install some packages -conda create --name <my-environment> <package_name>=<version>=<build_string> -# install packages into that environment again -conda install -c <channel> -n <my-environment> <package_name>=<version>=<build_string> -``` - ```sh title="micromamba environment" # load micromamba exe (just one exe) module load micromamba @@ -71,8 +63,6 @@ micromamba create -n <my-environment> <package_name>=<version>=<build_string> micromamba install -c conda-forge -n <my-environment> <package_name>=<version>=<build_string> ``` - - ## Q: Installing Cartopy on Jet Cluster or any other module based environment? [Cartopy Installation Notebook](QA-001-Cartopy-Installation-Jet.ipynb) @@ -80,7 +70,7 @@ The user needs to load `geos` and `proj` libraries and install via `pip install --user cartopy` or create an anaconda environment and install there. *Installing from `conda-forge` is also possible, without loading any modules.* -e.g. `conda install -c conda-forge cartopy` in a conda environment. +e.g. `micromamba install -n <my-env> -c conda-forge cartopy` in a conda environment. This installs the libraries as well. (Not recommended) ## Q: Load Modules into the current Notebook Environment? @@ -92,7 +82,7 @@ The Idea is to create a `load_modules_into_jupyter.conf` file in your home direc ## Q: How to create a user environment? [Conda/Virtual Environment](QA-003-Conda-Environment.ipynb) -The idea is to install a conda or virtual environment and use that as a kernel for your notebooks. *Please note the solution for cartopy* +The idea is to install a micromamba or virtual environment and use that as a kernel for your notebooks. *Please note the solution for cartopy* ## Q: The Notebook server on the TeachingHub won't start? [Teaching-Hub Spawn](QA-004-TeachingHub-SpawnFailed.md) @@ -115,11 +105,6 @@ Some are: and `atom`. This is simple editor available on any platform and it can be extended with packages to become a full grown IDE with the power of open source. -## Q: How to add a new package to anaconda module? -[Add Package](QA-006-Add-Packages-to-Anaconda-Modules.ipynb) - -It is relativly easy to install additional packages to a anaconda module distribution with `pip install --user`. - ## Q: How to restore a conda environment? [Save/Restore conda environment](QA-007-Restore-Conda-Environments.ipynb) diff --git a/Python/Your-First-Notebook-onJet_v2.ipynb b/Python/Your-First-Notebook-onJet_v2.ipynb index 3105d22615f1263039374d28e19fd20db04c683c..0b275affe15df53fc9901c1ceaa39249fc0c9d63 100644 --- a/Python/Your-First-Notebook-onJet_v2.ipynb +++ b/Python/Your-First-Notebook-onJet_v2.ipynb @@ -71,7 +71,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "mblaschek\n" + "yourusername\n" ] } ], @@ -88,7 +88,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "/jetfs/home/mblaschek/Documents\n" + "/jetfs/home/yourusername/Documents\n" ] } ], @@ -127,51 +127,17 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/bin/python\n" - ] - } - ], - "source": [ - "# Import sys and check the executable (so what python you are using)\n", - "import sys\n", - "print(sys.executable)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "**Notice the funny path?**\n", - "\n", - " Yes this is SPACK your nice scientific package manager. \n", - " Allows to build custom libraries and applications tailored to our needs!\n", - " Please not that software currently installed in /opt on JET01 is not available here.\n", - " Software under /opt is deprecated and will be removed after a full transition \n", - " to the current libraries\n", - "\n", - "More information on [SPACK](https://spack.io/) \n", - "\n", - "## Check your environmental PATH Variable, could be useful to know" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "data": { "text/plain": [ - "'/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/bin:/bin:/jetfs/spack/bin:/jetfs/userservices:/opt/jupyterhub/bin:/opt/slurm/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/share/Modules/bin::/jetfs/home/mblaschek/bin:/jetfs/home/mblaschek/.local/bin'" + "'/jetfs/manual/micromamba/2.2.0/bin:/jetfs/spack/bin:/jetfs/home/yourusername/micromamba/condabin:/jetfs/home/yourusername/bin:/jetfs/home/yourusername/.local/bin:/jetfs/userservices:/jetfs/spack/bin:/usr/share/Modules/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/jetfs/jupyterhub/jhub/bin'" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -189,15 +155,17 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, + "execution_count": 6, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\n", - " 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n" + " 1) micromamba/2.2.0 \n" ] } ], @@ -216,37 +184,22 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": {}, + "execution_count": 7, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Writing /jetfs/home/mblaschek/load_modules_into_jupyter.conf\n" + "Overwriting /jetfs/home/yourusername/load_modules_into_jupyter.conf\n" ] } ], "source": [ "%%writefile ~/load_modules_into_jupyter.conf\n", - "eccodes/2.18.0-gcc-8.3.1-s7clum3\n" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "eccodes/2.18.0-gcc-8.3.1-s7clum3\n" - ] - } - ], - "source": [ - "!cat ~/load_modules_into_jupyter.conf" + "eccodes/2.25.0-gcc-12.2.0-y2gnn47\n" ] }, { @@ -259,19 +212,18 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Currently Loaded Modulefiles:\n", - " 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n", - " 2) openmpi/4.0.5-gcc-8.3.1-773ztsv \n", - " 3) hdf5/1.12.0-gcc-8.3.1-awl4atl \n", - " 4) parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn \n", - " 5) netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k \n", - " 6) eccodes/2.18.0-gcc-8.3.1-s7clum3 \n" + " 1) micromamba/2.2.0 4) netcdf-c/4.9.2-gcc-12.2.0-wicjkfm \n", + " 2) mpich/4.1.2-gcc-12.2.0-mzdfzqb 5) eccodes/2.25.0-gcc-12.2.0-y2gnn47 \n", + " 3) hdf5/1.10.10-gcc-12.2.0-cnot2wb \n" ] } ], @@ -289,46 +241,127 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": {}, + "execution_count": 2, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "--------- /jetfs/spack/share/spack/modules/linux-rhel8-skylake_avx512 ----------\n", - "anaconda2/2019.10-gcc-8.3.1-5pou6ji \n", - "anaconda3/2019.10-gcc-8.3.1-tmy5mgp \n", - "anaconda3/2020.07-gcc-8.3.1-weugqkf \n", - "cdo/1.9.8-gcc-8.3.1-ipgvzeh \n", - "eccodes/2.18.0-gcc-8.3.1-s7clum3 \n", - "hdf5/1.12.0-gcc-8.3.1-awl4atl \n", - "intel-mkl/2020.3.279-gcc-8.3.1-5xeezjw \n", - "miniconda2/4.7.12.1-gcc-8.3.1-zduqggv \n", - "miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n", - "netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k \n", - "netcdf-fortran/4.5.3-gcc-8.3.1-kfd2vkj \n", - "openmpi/3.1.6-gcc-8.3.1-rk5av53 \n", - "openmpi/4.0.5-gcc-8.3.1-773ztsv \n", - "parallel-netcdf/1.12.1-gcc-8.3.1-gng2jcu \n", - "parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn \n", + "--------- \u001b[1;94m/jetfs/spack/share/spack/modules/linux-rocky8-skylake_avx512\u001b[0m ---------\n", + "anaconda3/2022.05-gcc-8.5rocky8-4bmyals \n", + "anaconda3/2023.03-1-gcc-8.5rocky8-sqi7jtx \n", + "arm-forge/22.1.1-gcc-8.5rocky8-bspohkw \n", + "autoconf/2.69-gcc-8.5rocky8-syodhbh \n", + "cdo/2.2.2-gcc-12.2.0-msrest5 \n", + "cdo/2.4.4-gcc-12.2.0-scx5tas \n", + "cmake/3.24.3-gcc-8.5rocky8-xbvhp7b \n", + "cmake/3.24.3-intel-2021.7.1-mqya6yj \n", + "eccodes/2.25.0-gcc-12.2.0-vp5krmy \n", + "eccodes/2.25.0-gcc-12.2.0-y2gnn47 \n", + "eccodes/2.25.0-intel-2021.7.1-nmixz3j \n", + "eccodes/2.35.0-gcc-12.2.0-llkav24 \n", + "eccodes/2.38.0-gcc-12.2.0-akxktxn \n", + "eccodes/2.40.0-gcc-12.2.0-bkcs4rk \n", + "extrae/4.0.6-gcc-12.2.0-p2ftbwa \n", + "fftw/3.3.10-gcc-12.2.0-fxobhly \n", + "fftw/3.3.10-gcc-12.2.0-jfdku2j \n", + "gcc/12.2.0-n4mqta4 \n", + "gcc/13.2.0-q3jhn5x \n", + "geos/3.9.1-intel-2021.7.1-taqq53o \n", + "geos/3.12.0-gcc-12.2.0-fa7igw7 \n", + "hdf5/1.10.10-gcc-12.2.0-cnot2wb \n", + "hdf5/1.12.2-intel-2021.7.1-eezva36 \n", + "intel-oneapi-compilers-classic/2021.7.0-gcc-8.5rocky8-fdw37cv \n", + "intel-oneapi-compilers/2022.2.1-exnxgdl \n", + "intel-oneapi-mkl/2022.2.1-intel-2021.7.1-vccyt4d \n", + "intel-oneapi-mkl/2023.2.0-gcc-12.2.0-hgi4mnb \n", + "intel-oneapi-mpi/2021.7.1-intel-2021.7.1-lsywigf \n", + "miniconda3/22.11.1-gcc-8.5rocky8-litfvls \n", + "mpich/4.1.2-gcc-12.2.0-mzdfzqb \n", + "nco/5.1.0-intel-2021.7.1-sftop5w \n", + "nco/5.1.6-gcc-12.2.0-k2osggy \n", + "ncview/2.1.8-intel-2021.7.1-thdjwvq \n", + "ncview/2.1.9-gcc-12.2.0-dyvf7db \n", + "netcdf-c/4.7.4-intel-2021.7.1-j4fp2gi \n", + "netcdf-c/4.9.2-gcc-12.2.0-wicjkfm \n", + "netcdf-fortran/4.5.3-intel-2021.7.1-sbwn2nk \n", + "netcdf-fortran/4.6.1-gcc-12.2.0-eicuxhe \n", + "netlib-lapack/3.9.1-gcc-8.5rocky8-cm6nni5 \n", + "netlib-lapack/3.9.1-index64-gcc-8.5rocky8-7isczxn \n", + "netlib-lapack/3.11.0-gcc-12.2.0-mlo7s42 \n", + "netlib-scalapack/2.2.0-gcc-12.2.0-kblcxkf \n", + "openblas/0.3.24-gcc-12.2.0-y7gmad2 \n", + "opencoarrays/2.10.1-gcc-12.2.0-bbwmgah \n", + "opencoarrays/2.10.1-gcc-12.2.0-o7auzjk \n", + "openmpi/4.1.1-gcc-8.5rocky8-kdi5pov \n", + "openmpi/4.1.6-gcc-12.2.0-nbabgma \n", + "proj/8.2.1-intel-2021.7.1-bgcfd33 \n", + "proj/9.2.1-gcc-12.2.0-bx4rp63 \n", + "r/4.3.0-gcc-12.2.0-mhbmxih \n", + "rdma-core/46.0-gcc-12.2.0-mkh4thn \n", + "valgrind/3.19.0-gcc-8.5rocky8-6nzwgjy \n", + "\n", + "--------- \u001b[1;94m/jetfs/spack/share/spack/modules/linux-rhel8-skylake_avx512\u001b[0m ----------\n", + "anaconda3/2020.11-gcc-8.5.0-gf52svn \n", + "anaconda3/2021.05-gcc-8.5.0-gefwhbz \n", + "autoconf/2.69-gcc-8.5.0-lejmm2i \n", + "autoconf/2.69-gcc-8.5rhel8-civunpc \n", + "cdo/2.0.1-gcc-8.5.0-dyzjir7 \n", + "cdo/2.1.1-intel-2021.7.1-wtifahn \n", + "cmake/3.21.4-gcc-8.5.0-bsilzh3 \n", + "cmake/3.21.4-gcc-8.5rhel8-tlexfai \n", + "cmake/3.24.3-intel-2021.7.1-3e63fby \n", + "eccodes/2.21.0-gcc-8.5.0-zjundl7 \n", + "eccodes/2.25.0-intel-2021.7.1-zqawf62 \n", + "gcc/8.5.0-7ka2e42 \n", + "geos/3.8.1-gcc-8.5.0-bymxoyq \n", + "geos/3.9.1-gcc-8.5.0-smhcud5 \n", + "geos/3.9.1-intel-2021.7.1-zrinbiw \n", + "hdf5/1.10.7-gcc-8.5.0-lt2uriw \n", + "hdf5/1.12.2-intel-2021.7.1-w5sw2dq \n", + "intel-oneapi-compilers/2022.2.1-zkofgc5 \n", + "intel-oneapi-mkl/2022.2.1-intel-2021.7.1-uu65kbx \n", + "intel-oneapi-mpi/2021.7.1-intel-2021.7.1-pt3unoz \n", + "intel-oneapi-vtune/2022.4.1-intel-2021.7.1-thzvq7z \n", + "libemos/4.5.9-gcc-8.5.0-igrwju3 \n", + "miniconda2/4.7.12.1-gcc-8.5.0-hkx7ovs \n", + "miniconda3/4.10.3-gcc-8.5.0-eyq4jvx \n", + "nco/5.0.1-gcc-8.5.0-pz242kb \n", + "nco/5.1.0-intel-2021.7.1-izrhxv2 \n", + "ncview/2.1.8-gcc-8.5.0-drrsgw2 \n", + "ncview/2.1.8-intel-2021.7.1-croyrc7 \n", + "netcdf-c/4.7.4-gcc-8.5.0-jchgjiu \n", + "netcdf-c/4.7.4-intel-2021.7.1-lnfs5zz \n", + "netcdf-cxx/4.2-gcc-8.5.0-l4wm5jr \n", + "netcdf-cxx4/4.3.1-gcc-8.5.0-vb2y67x \n", + "netcdf-fortran/4.5.3-gcc-8.5.0-qsqbozc \n", + "netcdf-fortran/4.5.3-intel-2021.7.1-27ldrnt \n", + "netlib-lapack/3.9.1-gcc-8.5.0-ipqdnxj \n", + "netlib-scalapack/2.1.0-gcc-8.5.0-azz4ujr \n", + "openblas/0.3.18-gcc-8.5.0-zv6qss4 \n", + "openmpi/4.0.5-gcc-8.5.0-ajmjw6n \n", + "openmpi/4.1.1-gcc-8.5.0-qlcihhp \n", + "openmpi/4.1.2-gcc-8.5.0-ioxcpyc \n", + "parallel-netcdf/1.12.2-gcc-8.5.0-4ucyla7 \n", + "proj/7.1.0-gcc-8.5.0-k3kp5sb \n", + "proj/8.1.0-gcc-8.5.0-4ydzmxc \n", + "proj/8.2.1-intel-2021.7.1-kxxw7ym \n", + "ucx/1.11.2-gcc-8.5.0-nqn7ryc \n", + "\n", + "------------- \u001b[1;94m/jetfs/spack/share/spack/modules/linux-rhel8-haswell\u001b[0m -------------\n", + "intel-parallel-studio/composer.2017.7-disfj2g \n", "\n", - "--------- /jetfs/spack/share/spack/modules/linux-rhel8-skylake_avx512 ----------\n", - "anaconda2/2019.10-gcc-8.3.1-5pou6ji \n", - "anaconda3/2019.10-gcc-8.3.1-tmy5mgp \n", - "anaconda3/2020.07-gcc-8.3.1-weugqkf \n", - "cdo/1.9.8-gcc-8.3.1-ipgvzeh \n", - "eccodes/2.18.0-gcc-8.3.1-s7clum3 \n", - "hdf5/1.12.0-gcc-8.3.1-awl4atl \n", - "intel-mkl/2020.3.279-gcc-8.3.1-5xeezjw \n", - "miniconda2/4.7.12.1-gcc-8.3.1-zduqggv \n", - "miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n", - "netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k \n", - "netcdf-fortran/4.5.3-gcc-8.3.1-kfd2vkj \n", - "openmpi/3.1.6-gcc-8.3.1-rk5av53 \n", - "openmpi/4.0.5-gcc-8.3.1-773ztsv \n", - "parallel-netcdf/1.12.1-gcc-8.3.1-gng2jcu \n", - "parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn \n" + "---------------------------- \u001b[1;94m/jetfs/manual/modules\u001b[0m -----------------------------\n", + "azure-cli/2.56.0 intel-stack/2021.7.1 rttov/v12.3-gcc-8.5.0 \n", + "dwd-opendata/0.2.0 mayavi/4.8.1 rttov/v13.2-gcc-8.5.0 \n", + "ecaccess-webtoolkit/6.3.1 micro/2.0.14 teleport/10.1.4 \n", + "enstools/v2020.11 micromamba/0.27.0 teleport/10.3.3 \n", + "enstools/v2021.11 micromamba/2.2.0 teleport/13.4.15 \n", + "gcc-stack/12.2.0 mojo/0.5.0 teleport/17.4.2 \n", + "go/1.22.4 ncl/6.6.2 \n" ] } ], @@ -343,17 +376,15 @@ "source": [ "# Software on JET\n", "Currently:\n", - " - [x] Anaconda (2,3)\n", - " - [x] Miniconda (2,3)\n", + " - [x] micromamba\n", " - [x] OPENMPI (4.0.5, 3.6.1) optimized for JET\n", " - [x] HDF5 (1.12) optimized with OPENMPI\n", " - [x] NetCDF (Parallel (NC3), NC4->HDF5)\n", - " - [x] Eccodes (2.18)\n", + " - [x] ECCodes \n", " - [x] CDO\n", - " - [x] Intel compiled Libraries (License) \n", - " - [x] Emoslib \n", + " - [x] Intel compiled Libraries\n", " - [x] Ecaccess\n", - " - [ ] RTTOV" + " - [x] RTTOV" ] }, { @@ -363,10 +394,9 @@ "## Currently there are a few choices:\n", "\n", "1. Python (2, 3)\n", - " * Anaconda\n", - " * Miniconda\n", + " * micromamba environments\n", "2. Julia (not yet)\n", - "3. R (not yet)" + "3. R" ] }, { @@ -385,8 +415,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: numpy in /jetfs/home/mblaschek/.local/lib/python3.8/site-packages (1.19.2)\n", - "Requirement already satisfied: scipy in /jetfs/home/mblaschek/.local/lib/python3.8/site-packages (1.5.2)\n", + "Requirement already satisfied: numpy in /jetfs/home/yourusername/.local/lib/python3.8/site-packages (1.19.2)\n", + "Requirement already satisfied: scipy in /jetfs/home/yourusername/.local/lib/python3.8/site-packages (1.5.2)\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } @@ -426,224 +456,173 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Using conda" + "## Using micromamba" ] }, { "cell_type": "code", - "execution_count": 15, - "metadata": {}, + "execution_count": 3, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", - " active environment : None\n", - " user config file : /jetfs/home/mblaschek/.condarc\n", - " populated config files : /jetfs/home/mblaschek/.condarc\n", - " conda version : 4.8.5\n", - " conda-build version : not installed\n", - " python version : 3.8.1.final.0\n", - " virtual packages : __glibc=2.28\n", - " base environment : /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv (read only)\n", - " channel URLs : https://repo.anaconda.com/pkgs/main/linux-64\n", - " https://repo.anaconda.com/pkgs/main/noarch\n", - " https://repo.anaconda.com/pkgs/r/linux-64\n", - " https://repo.anaconda.com/pkgs/r/noarch\n", - " package cache : /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/pkgs\n", - " /jetfs/home/mblaschek/.conda/pkgs\n", - " envs directories : /jetfs/home/mblaschek/.conda/envs\n", - " /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/envs\n", - " platform : linux-64\n", - " user-agent : conda/4.8.5 requests/2.22.0 CPython/3.8.1 Linux/4.18.0-147.el8.x86_64 centos/8.2.2004 glibc/2.28\n", - " UID:GID : 54212:100\n", - " netrc file : None\n", - " offline mode : False\n", - "\n" + " libmamba version : 2.2.0\n", + " micromamba version : 2.2.0\n", + " curl version : libcurl/8.14.1 OpenSSL/3.5.0 zlib/1.3.1 zstd/1.5.7 libssh2/1.11.1 nghttp2/1.64.0\n", + " libarchive version : libarchive 3.7.7 zlib/1.3.1 bz2lib/1.0.8 libzstd/1.5.7\n", + " envs directories : /jetfs/home/yourusername/micromamba/envs\n", + " package cache : /jetfs/home/yourusername/micromamba/pkgs\n", + " /jetfs/home/yourusername/.mamba/pkgs\n", + " environment : base\n", + " env location : /jetfs/home/yourusername/micromamba\n", + " user config files : /jetfs/home/yourusername/.mambarc\n", + " populated config files : /jetfs/home/yourusername/.condarc\n", + " virtual packages : __unix=0=0\n", + " __linux=4.18.0=0\n", + " __glibc=2.28=0\n", + " __archspec=1=x86_64_v4\n", + " channels : https://conda.anaconda.org/conda-forge/linux-64\n", + " https://conda.anaconda.org/conda-forge/noarch\n", + " base environment : /jetfs/home/yourusername/micromamba\n", + " platform : linux-64\n" ] } ], "source": [ - "!conda info" + "!micromamba info" ] }, { "cell_type": "code", - "execution_count": 16, - "metadata": {}, + "execution_count": 3, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# Create a environment with conda\n", + "# use -q quiet\n", + "# -y yes to all questions\n", + "# -c [] use conda-forge FLOSS channel\n", + "# -n [] name of the environment\n", + "# add packages, e.g.: python at version 3.12 numpy an ipykernel (required for jupyter integration)\n", + "!micromamba create -q -y -c conda-forge -n myenv python=3.12 numpy ipykernel" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Collecting package metadata (current_repodata.json): done\n", - "Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.\n", - "Collecting package metadata (repodata.json): done\n", - "Solving environment: done\n", - "\n", - "## Package Plan ##\n", - "\n", - " environment location: /jetfs/home/mblaschek/.conda/envs/myenv\n", - "\n", - " added / updated specs:\n", - " - ipykernel\n", - " - numpy\n", - " - python=3.7\n", - "\n", - "\n", - "The following NEW packages will be INSTALLED:\n", - "\n", - " _libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main\n", - " backcall pkgs/main/noarch::backcall-0.2.0-py_0\n", - " blas pkgs/main/linux-64::blas-1.0-mkl\n", - " ca-certificates pkgs/main/linux-64::ca-certificates-2020.10.14-0\n", - " certifi pkgs/main/linux-64::certifi-2020.6.20-py37_0\n", - " decorator pkgs/main/noarch::decorator-4.4.2-py_0\n", - " intel-openmp pkgs/main/linux-64::intel-openmp-2020.2-254\n", - " ipykernel pkgs/main/linux-64::ipykernel-5.3.4-py37h5ca1d4c_0\n", - " ipython pkgs/main/linux-64::ipython-7.18.1-py37h5ca1d4c_0\n", - " ipython_genutils pkgs/main/linux-64::ipython_genutils-0.2.0-py37_0\n", - " jedi pkgs/main/linux-64::jedi-0.17.2-py37_0\n", - " jupyter_client pkgs/main/noarch::jupyter_client-6.1.7-py_0\n", - " jupyter_core pkgs/main/linux-64::jupyter_core-4.6.3-py37_0\n", - " ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7\n", - " libedit pkgs/main/linux-64::libedit-3.1.20191231-h14c3975_1\n", - " libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2\n", - " libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0\n", - " libsodium pkgs/main/linux-64::libsodium-1.0.18-h7b6447c_0\n", - " libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0\n", - " mkl pkgs/main/linux-64::mkl-2020.2-256\n", - " mkl-service pkgs/main/linux-64::mkl-service-2.3.0-py37he904b0f_0\n", - " mkl_fft pkgs/main/linux-64::mkl_fft-1.2.0-py37h23d657b_0\n", - " mkl_random pkgs/main/linux-64::mkl_random-1.1.1-py37h0573a6f_0\n", - " ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1\n", - " numpy pkgs/main/linux-64::numpy-1.19.1-py37hbc911f0_0\n", - " numpy-base pkgs/main/linux-64::numpy-base-1.19.1-py37hfa32c7d_0\n", - " openssl pkgs/main/linux-64::openssl-1.1.1h-h7b6447c_0\n", - " parso pkgs/main/noarch::parso-0.7.0-py_0\n", - " pexpect pkgs/main/linux-64::pexpect-4.8.0-py37_1\n", - " pickleshare pkgs/main/linux-64::pickleshare-0.7.5-py37_1001\n", - " pip pkgs/main/linux-64::pip-20.2.3-py37_0\n", - " prompt-toolkit pkgs/main/noarch::prompt-toolkit-3.0.8-py_0\n", - " ptyprocess pkgs/main/linux-64::ptyprocess-0.6.0-py37_0\n", - " pygments pkgs/main/noarch::pygments-2.7.1-py_0\n", - " python pkgs/main/linux-64::python-3.7.9-h7579374_0\n", - " python-dateutil pkgs/main/noarch::python-dateutil-2.8.1-py_0\n", - " pyzmq pkgs/main/linux-64::pyzmq-19.0.2-py37he6710b0_1\n", - " readline pkgs/main/linux-64::readline-8.0-h7b6447c_0\n", - " setuptools pkgs/main/linux-64::setuptools-50.3.0-py37hb0f4dca_1\n", - " six pkgs/main/noarch::six-1.15.0-py_0\n", - " sqlite pkgs/main/linux-64::sqlite-3.33.0-h62c20be_0\n", - " tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0\n", - " tornado pkgs/main/linux-64::tornado-6.0.4-py37h7b6447c_1\n", - " traitlets pkgs/main/noarch::traitlets-5.0.5-py_0\n", - " wcwidth pkgs/main/noarch::wcwidth-0.2.5-py_0\n", - " wheel pkgs/main/noarch::wheel-0.35.1-py_0\n", - " xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0\n", - " zeromq pkgs/main/linux-64::zeromq-4.3.3-he6710b0_3\n", - " zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3\n", - "\n", - "\n", - "Preparing transaction: done\n", - "Verifying transaction: done\n", - "Executing transaction: done\n", - "#\n", - "# To activate this environment, use\n", - "#\n", - "# $ conda activate myenv\n", - "#\n", - "# To deactivate an active environment, use\n", - "#\n", - "# $ conda deactivate\n", - "\n" + " Name Active Path \n", + "────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n", + " base * /jetfs/home/yourusername/micromamba \n", + " modern /jetfs/home/yourusername/micromamba/envs/modern \n", + " myenv /jetfs/home/yourusername/micromamba/envs/myenv \n" ] } ], "source": [ - "# Create a environment with conda\n", - "!conda create -y -n myenv python=3.7 numpy ipykernel" + "# show available environment\n", + "!micromamba env list" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Activating a conda environment\n", - "\n", - "It is not recommended to use `conda init bash`, because it will write that specific version into your `.bashrc` file and will result in errors when you move to another module or newer version.\n", - "\n", - "Hint: Checkout the guides on [Gitlab](https://gitlab.phaidra.org/imgw/computer-resources/-/blob/master/Python/QA-003-Conda-Environment.ipynb#Activate-your-conda-environment)\n", - "\n", - "### Load bash conda configuration\n", - "This script is used by `conda init bash` to set the configuration, we simply source (load) it and get the same functionality as we would be using `conda init bash`. **(Do not use `conda init bash`)**\n", - "\n", - "```bash\n", - "source $(dirname $(which conda))/../etc/profile.d/conda.sh\n", - "# now activating the environment works\n", - "conda activate myenv\n", - "```\n", - "optionaly you can add this bash function to your `.bashrc` for convenience:\n", - "```bash\n", - "conda_activate(){\n", - " if ! command -v conda &> /dev/null; then\n", - " echo \"Load ana/miniconda module first\"\n", - " else\n", - " if [ $# -ne 1 ]; then\n", - " echo \"usage: conda_activate [env-name]\"\n", - " \n", - " else\n", - " source $(dirname $(which conda))/../etc/profile.d/conda.sh\n", - " conda activate $1\n", - " fi\n", - " fi\n", - "}\n", - "```\n", - "After your `.bashrc` has been loaded (e.g. logout/login again) you should be able to use\n", - "\n", - "```bash\n", - "module load anaconda3\n", - "conda_activate myenv\n", - "```\n", - "\n", - "### Activate your kernel in your notebooks\n", - "\n", - "Please run the follwoing command and install the ipykernel, if it is not yet installed:" + "### Add the new environment to your active kernels\n", + "This way you can choose the kernel from the Jupyterlab launcher." ] }, { "cell_type": "code", - "execution_count": 17, - "metadata": {}, + "execution_count": 5, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Installed kernelspec MYENV in /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n" + "Installed kernelspec MYENV in /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n" ] } ], "source": [ - "!~/.conda/envs/myenv/bin/python -m ipykernel install --user --name MYENV --display-name \"MYCONDA\"" + "!~/micromamba/envs/myenv/bin/python -m ipykernel install --user --name MYENV --display-name \"Py3.12\"" ] }, { - "cell_type": "code", - "execution_count": 18, + "cell_type": "markdown", "metadata": {}, + "source": [ + "### Activate your environment\n", + "Micromamba environments need to be added to the `PATH` to work well. So there is an `activate` function for these environments.\n", + "\n", + "**You just need to run this once**\n", + "\n", + "```bash\n", + "# initialize bash shell\n", + "$ micromamba shell init -s bash\n", + "Running `shell init`, which:\n", + " - modifies RC file: \"/jetfs/home/yourusername/.bashrc\"\n", + " - generates config for root prefix: \"/jetfs/home/yourusername/micromamba\"\n", + " - sets mamba executable to: \"/jetfs/manual/micromamba/2.2.0/bin/micromamba\"\n", + "The following has been added in your \"/jetfs/home/yourusername/.bashrc\" file\n", + "\n", + "# >>> mamba initialize >>>\n", + "# !! Contents within this block are managed by 'micromamba shell init' !!\n", + "export MAMBA_EXE='/jetfs/manual/micromamba/2.2.0/bin/micromamba';\n", + "export MAMBA_ROOT_PREFIX='/jetfs/home/yourusername/micromamba';\n", + "__mamba_setup=\"$(\"$MAMBA_EXE\" shell hook --shell bash --root-prefix \"$MAMBA_ROOT_PREFIX\" 2> /dev/null)\"\n", + "if [ $? -eq 0 ]; then\n", + " eval \"$__mamba_setup\"\n", + "else\n", + " alias micromamba=\"$MAMBA_EXE\" # Fallback on help from micromamba activate\n", + "fi\n", + "unset __mamba_setup\n", + "# <<< mamba initialize <<<\n", + "```\n", + "\n", + "will edit your `.bashrc`. After some time you might have to do this again, when the micromamba version changed a lot (e.g.: `micromamba shell reinit -s bash`)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Available kernels:\n", - " myenv /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n", - " python3 /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/share/jupyter/kernels/python3\n" + " myenv /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n", + " rttovv13.2 /jetfs/home/yourusername/.local/share/jupyter/kernels/rttovv13.2\n", + " enstoolsv2021.11 /jetfs/jupyterhub/alpha/share/jupyter/kernels/enstoolsv2021.11\n", + " ir /jetfs/jupyterhub/alpha/share/jupyter/kernels/ir\n", + " modelling /jetfs/jupyterhub/alpha/share/jupyter/kernels/modelling\n", + " python3 /jetfs/jupyterhub/alpha/share/jupyter/kernels/python3\n" ] } ], "source": [ + "# List available Kernels\n", "!jupyter kernelspec list" ] }, @@ -693,7 +672,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Installed kernelspec fancy in /jetfs/home/mblaschek/.local/share/jupyter/kernels/fancy\n" + "Installed kernelspec fancy in /jetfs/home/yourusername/.local/share/jupyter/kernels/fancy\n" ] } ], @@ -719,9 +698,8 @@ "output_type": "stream", "text": [ "Available kernels:\n", - " fancy /jetfs/home/mblaschek/.local/share/jupyter/kernels/fancy\n", - " myenv /jetfs/home/mblaschek/.local/share/jupyter/kernels/myenv\n", - " python3 /jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.3.1/miniconda3-4.8.2-3m7b6t2kgedyr3jnd2nasmgiq7wm27iv/share/jupyter/kernels/python3\n" + " fancy /jetfs/home/yourusername/.local/share/jupyter/kernels/fancy\n", + " myenv /jetfs/home/yourusername/.local/share/jupyter/kernels/myenv\n" ] } ], @@ -741,7 +719,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Miniconda3 (4.10.3) - 3.9.5", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -755,7 +733,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.9.0" } }, "nbformat": 4, diff --git a/Python/conda-kernel-setup.sh b/Python/conda-kernel-setup.sh index d469697226f623da5d5b33cd1b14c25c96c8ce96..8dbe5cb5cdc346681f5a0c55c59d2f694769b395 100644 --- a/Python/conda-kernel-setup.sh +++ b/Python/conda-kernel-setup.sh @@ -3,18 +3,18 @@ # Jumpstart a python environment for my students # Activate anaconda module -module load anaconda3 +module load micromamba # Create a new kernel that is based on anaconda, but with some additional packages # potentially specify which python version, e.g. python=3.8 -conda create -y -n ClimatePy3 numpy ipykernel zarr +micromamba create -y -c conda-forge -n ClimatePy3 numpy ipykernel zarr # This will create a ~/.conda/envs/ClimatePy3/ directory -# using ~/.conda/envs/ClimatePy3/bin/python3 in a script is possible +# using ~/micromamba/envs/ClimatePy3/bin/python3 in a script is possible # activate that environment by sourcing the conda environment -source $(dirname $(which conda))/../etc/profile.d/conda.sh +eval "$(micromamba shell hook --shell bash)" # and activating your new -conda activate ClimatePy3 +micromamba activate ClimatePy3 # deactivate environment -conda deactivate +micromamba deactivate # FIN \ No newline at end of file