To completely uninstall Python and Jupyter Notebook from a Windows 11 machine, follow these steps:
Step 1: Uninstall Python
-
Open Settings:
- Click on the Start Menu and select Settings (the gear icon) or press
Windows + I.
-
Go to Apps:
- In the Settings menu, click on Apps.
-
Find Python:
- Under Apps & features, scroll through the list or use the search bar to find Python (there may be multiple entries based on the version installed).
-
Uninstall Python:
- Click on the Python version you want to uninstall, then select Uninstall.
- Follow any prompts that appear to complete the uninstallation.
Step 2: Uninstall Jupyter Notebook
Jupyter may have been installed via pip (Python package manager) or Anaconda. Follow the appropriate method below:
If Jupyter was installed via pip:
-
Open Command Prompt:
- Press
Windows + R, type cmd, and hit Enter.
-
Uninstall Jupyter:
pip uninstall jupyter jupyterlab notebook
-
Confirm Uninstallation:
- Follow the prompts in the terminal to confirm the uninstallation.
If Jupyter was installed via Anaconda:
-
Open Anaconda Navigator:
- Search for Anaconda Navigator in the Start menu and open it.
-
Go to Environments:
- Click on the Environments tab on the left.
-
Select the Environment:
- If you installed Jupyter in the
base environment, choose that. If it was in a different environment, select that instead.
-
Uninstall Jupyter:
- In the package list, find Jupyter Notebook or JupyterLab.
- Check the box next to it and select the option to Mark for removal.
- Apply the changes to uninstall Jupyter.
Step 3: Remove Residual Files (Optional)
- Delete Configuration Directories:
- Open File Explorer, and in the address bar, type
%USERPROFILE% and press Enter.
- Look for and delete the following folders if they exist:
.jupyter
.ipython
.conda (only if using Anaconda)
Step 4: Clean Up Environment Variables (Optional)
-
Open Environment Variables:
- In the Start menu, search for Environment Variables and select Edit the system environment variables.
- Click the Environment Variables button.
-
Check for Python Paths:
- Under System variables, look for
Path.
- Click on it and select Edit.
- Look for any entries related to Python and delete them.
Step 5: Restart Your Computer
- It's a good idea to restart your computer to ensure all changes take effect.
Reinstalling Python and Jupyter Notebook
If you want to reinstall Python and Jupyter Notebook after uninstalling, consider using the Anaconda distribution, which simplifies the installation process and package management.
Conclusion
Following these steps should completely remove Python and Jupyter Notebook from your Windows 11 machine. If you encounter any issues, please let me know!