If you're working in data science, machine learning, or Python programming in general, it's essential to use the latest version of Python. Older versions may not support newer libraries or features. In this guide, you'll learn how to configure Jupyter Notebook to use the latest version of Python on your PC.
Go to the official Python website:
https://www.python.org/downloads/
Download the latest stable release for your operating system. During installation, make sure you check the option “Add Python to PATH.”
This ensures that Python will work properly from the command line.
Image suggestion: A screenshot of the Python downloads page.
To verify installation, open your terminal or command prompt and run:
css
CopyEdit
python --version
You should see the latest version number, such as:
nginx
CopyEdit
Python 3.12.1
If not, try restarting your PC or checking if Python was added to the PATH variable correctly.
Image suggestion: Terminal window showing python --version
.
Jupyter Notebook runs Python using “kernels.” To use a specific version of Python, you need to install a new kernel pointing to that version.
Use the following command:
nginx
CopyEdit
python -m pip install ipykernel
This installs the required tools to register your Python version as a Jupyter kernel.
Run this command to register the kernel:
arduino
CopyEdit
python -m ipykernel install --user --name=python312 --display-name "Python 3.12"
-name=python312
is the internal kernel name"Python 3.12"
is what will be shown in the Jupyter interfaceNow Jupyter will recognize this version and let you use it in your notebooks.
If Jupyter is not installed, install it using:
nginx
CopyEdit
pip install notebook
Then launch it with:
nginx
CopyEdit
jupyter notebook
It will open in your default browser. To select the newly installed Python version:
🔧 Troubleshooting Common Issues • Kernel not showing in Jupyter → Rerun the ipykernel installation command
• jupyter command not working → Run pip install notebook
• Wrong Python version executing → Use py -3.12 or full path to specific Python executable
• PATH-related error during setup → Reinstall Python and ensure “Add to PATH” is checked
This setup ensures you're always working with the best tools for learning, developing, and exploring Python.