Installation Guide
Installation Guide for Deep Learning 2022
Installation Guide
(updated 2022.4) (updated 2024.4)
This installation guide is for programming deep-learning application using Pytorch
Make sure you install the correct software version as instructed.
For DLIP 2024 Lecture:
Python 3.9, CUDA 11.8, cuDNN 7.6
PyTorch 2.0.x
Anaconda for Python 3.9 or Anaconda of Latest Version
For DLIP 2022 Lecture:
Python 3.9, CUDA 10.2, cuDNN 7.6
PyTorch 1.9.1
Anaconda for Python 3.9 or Anaconda of Latest Version
for MacOS
(To be Updated)
The installation is divided by two parts
Installing Python Environment
Installing Graphic Card and CUDA
Installing DL Framework (PyTorch, etc)
Summary
DLIP 2024-1
Part 1. Installing Python Environment
Step 1. Install Anaconda
Anaconda : Python and libraries package installer.
Follow: How to install Anaconda
Step 2. Install Python
Python 3.9 (2022-1)
Python is already installed by installing Anaconda. But, we will make a virtual environment for a specific Python version.
Open Anaconda Prompt(admin mode)
First, update conda
Then, Create virtual environment for Python 3.9. Name the $ENV as
py39
. If you are in base, enterconda activate py39
After installation, activate the newly created environment
Step 3. Install Libs
Install Numpy, OpenCV, Matplot, Jupyter
Step 4. Install Visual Studio Code
Follow: How to Install VS Code
Also, read about
Part 2. Installing Graphic Card and CUDA
Step 5. Install GPU Driver, CUDA, cuDNN
Skip this if you do not have GPU card.
Nvidia GPU driver and Library : To operate the GPU.
Graphic Driver - Mandatory installation. Download from NVIDIA website
CUDA — GPU library. Stands for Compute Unified Device Architecture.
cuDNN — DL primitives library based on CUDA. Stands for CUDA Deep Neural Network.
Follow How to install Driver, CUDA and cuDNN
Part 3. Installing DL Framework
TensorFlow — DL library, developed by Google.
Keras — DL wrapper with interchangeable backends. Can be used with TensorFlow, Theano or CNTK.
PyTorch — Dynamic DL library with GPU acceleration.
Step 6. Install Pytorch
See here for install instructions of Previous PyTorch Versions PyTorch Previous-Version
Without GPU(Only CPU)
With GPU Change the PyTorch version depending on your CUDA version
For DLIP 2024
For DLIP 2022
Check the pytorch and torchvision are cuda versions when installing
Check GPU in PyTorch
The result should be cuda
as shown.
If your result is,
cuda
: GOOD, installed normally. You do not need to follow the steps below.cpu
: Go to Troubleshooting
Check Package Versions in Conda
You can read more about PyTorch installation
Other Option: Install Tensorflow and Keras
Run 'Anaconda Prompt(admin)'
Activate virtual environment
install tensorflow-gpu 2.3.0 packages
install keras
Troubleshooting
Q1. GPU not detected in PyTorch
SOLUTION 1) Type conda list
in the py39
environment
conda list
in the py39
environmentcheck whether
cudatoolkit
,cudnn
are installedcheck whether
pytorch
is thecuda
versionIf it is not the same as the figure, re-install. else go to SOLUTION 2
SOLUTION 2) NVIDIA graphics driver update
If the NVIDIA graphics driver is not installed or if it is an older version, the GPU may not be detected. Please refer to the How to install Driver, CUDA and cuDNN to install Graphic Driver.
Q2. Conda error: Downloaded bytes did not match Content-Length
Solution
Update Conda in Base:
conda update -n base -c defaults conda
Clean the conda cache in Base
conda clean --all
Activate Env:
conda activate py39
Update Packages:
conda update --all
Clean conda cache:
conda clean --all
Then, Install again
Q3. Conda Error: ClobberError: This has incompatible packages due to a shared path, CondaVerification Error
Go to Solution of Q2
If this does not work, then you need to Re-Install the Conda Environment. Then, Update CONDA then create Environment again.
Q4. Build Error in VS Code ( Numpy C-extension failed)
SOLUTION ) Default Profile Setting in CODE
F1
키를 눌러 select default profile
을 검색 후 클릭 → command prompt
를 선택합니다.
Last updated