- How to install Cuda on Windows 11 and Anaconda?
- Run Jupyter Notebooks in PyCharm
- pip commands
- Delete Kernel
-
Cuda & CuDNN files Download
-
Python 3 & pip with Anaconda(latest installed)
-
Microsoft Visual Studio 2022 C++ redistributables with dot net 4.5 or above installed
-
Make sure you have already Anaconda installed with JupyterNotebook & everything is working fine.
-
Download the CUDA toolkit from here:- https://developer.nvidia.com/cuda-downloads#
-
choose your options like OS and arch of OS based on your system configurations. Then download the file and install it in your C//: DRIVE, while installation uses EXPRESS(recommended) mode.
- After installing CUDA, you must download CuDNN (https://developer.nvidia.com/rdp/cudnn-archive), an extension that supports CUDA files for running Deep Learning applications.
- NOTE: MAKE SURE THE CUDNN VERSION AND CUDA TOOLKIT VERSIONS ARE SAME
- Once you have downloaded CuDNN Local Installer for Windows (Zip), extract files to the CUDA installation directory in C:// drive
- now one by copy & replace these folders to the CUDA installation directory
- you have finally completed your CUDA Toolkit installation with CuDNN.
- Now it’s time to set Path variables → open Edit environment variables in the Windows search bar, Click on Environment variables, click on “path” under user variables, then add the paths of “bin” and “lineup.”
- Right-click on Start, then click on Run. Type: sysdm.cpl and click on OK. Click on the "Advanced" tab, then click on the "Environment Variables..."
- Finally, you’re done with the installation part of CUDA & CuDNN; just verify it’s properly installed, Goto Power-Shell, and enter the command “Nvidia-semi.”
- nvcc --version
- nvidia-smi
In Anaconda cmd.exe prompt:
- conda create -n "name of your virtual environment" python=3.6.8
- conda activate "name of your virtual environment"
- conda install -c anaconda tensorflow-gpu keras-gpu
- conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia # batavajoh be version cuda
-https://pytorch.org/get-started/locally/
5.pip install ipykernel
- python -m ipykernel install --user --name --display-name "Python (GPU)" # then launch jypiternotebook
- pip install --upgrade jupyterhub
- pip install --upgrade --user nbconvert
- jupyter kernelspec list
- jupyter kernelspec uninstall your_env_name
or
- jupyter kernelspec list
- cd /path/to/kernelspecs/kernel_name
- rm -r /path/to/kernelspecs/kernel_name
- jupyter kernelspec remove kernel_name
- pip install package_name
- pip uninstall package_name
- pip uninstall package_name
- pip show package_name
- pip freeze requirements.txt
- pip cache purge
- pip list
- python -m site --user-site # path to site package
- python -m venv # python3.8 -m venv env
- source env/bin/activate in linux or env/Scripts/activate.bat //In CMD windows
step 0: Prerequisites
- Python 3.x (preferably the latest version)
- Jupyter Notebook
- virtualenv (for creating virtual environments)
Step 1: Create a Python 3 Virtual Environment
- virtualenv -p python3.9 name
Step 2: Activate the Virtual Environment
- source name/bin/activate
Step 3: Install the IPython Kernel Package
- pip install ipykernel
Step 4: Register the Kernel with Jupyter
- python -m ipykernel install --user --name=my-python3-kernel