1. Compile and install python3.12
Python 3.12 must use openssl1.1.1 or above, otherwise, an SSLERr error will be reported when installing components by pip.
1. Compile and install openssl1.1.1
wget -c /openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1. tar -zxvf openssl-1.1. ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib make install -j 4 ln -sf /usr/local/openssl/bin/openssl /usr/bin/openssl echo "/usr/local/openssl/lib" >> /etc// ldconfig
2. Compile and install python3.12
wget -c /ftp/python/3.12.4/Python-3.12. tar -xvf Python-3.12. ./configure --enable-optimizations --with-openssl=/usr/local/openssl --prefix=/usr/local/python3 make install -j 4 ln -sf /usr/local/python3/bin/python3.12 /usr/local/bin/python ln -sf /usr/local/python3/bin/python3.12 /usr/local/bin/python3 ln -sf /usr/local/python3/bin/pip3.12 /usr/local/bin/pip3 ln -sf /usr/local/python3/bin/pip3.12 /usr/local/bin/pip vi /etc/profile export PYTHON_HOME=/usr/local/python3 export PATH=$PATH:$PYTHON_HOME/bin:
3. Use pip to install jupyter service
#Installing Componentspip install jupyter notebook #Generate configurationpython jupyter notebook --generate-config --allow-root #Add to the generated ~/.jupyter/jupyter_notebook_config.py configuration file finally="*" .allow_root=True .open_browser=False =4090 .root_dir='/opt/jupyter/root' #Generate passwordjupyter notebook password #Start the servicenohup jupyter notebook > /opt/jupyter/ 2>&1 &
Attachment: Vbox virtual machine partition adjustment (/home:150G /root:50G)
1. Uninstall /home directory umount /home. If the prompt device is busy, you can use the lsof /home command to obtain the pid and execute kill and then uninstall it directly to the successful
2. Remove /home partition lvremove /dev/mapper/centos-home
3. Expand the lv where /root is located, and add 100G lvextend -L +100G /dev/mapper/centos-root
4. Extend/root file system xfs_growfs /dev/mapper/centos-root
5. Recreate/home partition lvcreate -L 40G -n home centos
6. Mount/home partition mount /dev/centos/home /home
7. View partition information df -hT
This is the end of this article about the implementation of the jupyter environment for python3.12 installation. For more related content on python3.12 installation of jupyter, please search for my previous articles or continue browsing the following related articles. I hope everyone will support me in the future!