From 72d1f5e44b66eedf17aa7c67c5d8860040286afc Mon Sep 17 00:00:00 2001 From: MrPoll0 Date: Mon, 21 Jul 2025 05:18:23 +0200 Subject: [PATCH] fix: python version to 3.10.12, previous method didnt change it --- notebooks/bonus-unit1/bonus-unit1.ipynb | 20 +++++++------------- notebooks/bonus-unit1/bonus_unit1.ipynb | 20 +++++++------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/notebooks/bonus-unit1/bonus-unit1.ipynb b/notebooks/bonus-unit1/bonus-unit1.ipynb index 93db85ad..c8bcfa5d 100644 --- a/notebooks/bonus-unit1/bonus-unit1.ipynb +++ b/notebooks/bonus-unit1/bonus-unit1.ipynb @@ -213,22 +213,16 @@ "metadata": {}, "outputs": [], "source": [ - "# Install virtualenv and create a virtual environment\n", - "!pip install virtualenv\n", - "!virtualenv myenv\n", - "\n", "# Download and install Miniconda\n", - "!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n", - "!chmod +x Miniconda3-latest-Linux-x86_64.sh\n", - "!./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local\n", + "!wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh\n", + "!bash ./miniconda.sh -b -f -p /usr/local\n", "\n", - "# Activate Miniconda and install Python ver 3.10.12\n", - "!source /usr/local/bin/activate\n", - "!conda install -q -y --prefix /usr/local python=3.10.12 ujson # Specify the version here\n", + "# Install Python version 3.10.12\n", + "!conda install -q -y python=3.10.12 jupyter google-colab traitlets=5.5.0 -c conda-forge\n", + "!python -m ipykernel install --name \"py31012\" --user\n", "\n", - "# Set environment variables for Python and conda paths\n", - "!export PYTHONPATH=/usr/local/lib/python3.10/site-packages/\n", - "!export CONDA_PREFIX=/usr/local/envs/myenv" + "# Remove Miniconda installation script\n", + "!rm ./miniconda.sh" ] }, { diff --git a/notebooks/bonus-unit1/bonus_unit1.ipynb b/notebooks/bonus-unit1/bonus_unit1.ipynb index a85452b3..ab01f836 100644 --- a/notebooks/bonus-unit1/bonus_unit1.ipynb +++ b/notebooks/bonus-unit1/bonus_unit1.ipynb @@ -209,22 +209,16 @@ "metadata": {}, "outputs": [], "source": [ - "# Install virtualenv and create a virtual environment\n", - "!pip install virtualenv\n", - "!virtualenv myenv\n", - "\n", "# Download and install Miniconda\n", - "!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n", - "!chmod +x Miniconda3-latest-Linux-x86_64.sh\n", - "!./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local\n", + "!wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh\n", + "!bash ./miniconda.sh -b -f -p /usr/local\n", "\n", - "# Activate Miniconda and install Python ver 3.10.12\n", - "!source /usr/local/bin/activate\n", - "!conda install -q -y --prefix /usr/local python=3.10.12 ujson # Specify the version here\n", + "# Install Python version 3.10.12\n", + "!conda install -q -y python=3.10.12 jupyter google-colab traitlets=5.5.0 -c conda-forge\n", + "!python -m ipykernel install --name \"py31012\" --user\n", "\n", - "# Set environment variables for Python and conda paths\n", - "!export PYTHONPATH=/usr/local/lib/python3.10/site-packages/\n", - "!export CONDA_PREFIX=/usr/local/envs/myenv" + "# Remove Miniconda installation script\n", + "!rm ./miniconda.sh" ] }, {