Summary of reasons for cuda installation failure

Table of contents

First, what is the correspondence between the cuda version and the graphics card driver?

Second, the relationship between cudnn and cuda?

Three, how to use cuda and cudnn?

Fourth, how to install cv2?

Five, upgrade the pip command

Sixth, the prompt in cmd lacks pip, python, conda and other commands

7. How to install the environmental dependencies of the GitHub project with one click

1. Enter the cmd command line in the project folder

2. Just run a line of code

Eight, various conda commands (create a virtual environment, install libraries...)

1. What is the role of anaconda?

2. Common conda commands


First, what is the correspondence between the cuda version and the graphics card driver?

        Because cuda, cudnn, and NVIDIA graphics card drivers are related, there are two aspects to consider when choosing the cuda version. The first aspect: what version of cuda does your project need; the second aspect: after you select the cuda version required by your project, make sure that your graphics card driver supports your cuda version.

        The summary is: the cuda version you choose must satisfy both the project and the graphics card driver.

        The correspondence between the cuda version and the driver version is as follows: Query the correspondence between the cuda version and the graphics card driver .

        How to check the driver version of the graphics card? As shown below.

Second, the relationship between cudnn and cuda?

        The choice of cudnn version should correspond to cuda. cudnn download address . cuda download address . Among them, cudnn requires an NVIDIA account.

Three, how to use cuda and cudnn?

        We only need to complete the installation, and the git project from GitHub will automatically call the cuda and cudnn libraries.

Fourth, how to install cv2?

        Using pip install cv2 will definitely not work. The correct way is pip install opencv-python.

pip install opencv-python

Five, upgrade the pip command

        When using the pip command to install the third library and prompting that the latest version of pip is required, use the following command to upgrade.

pip install –upgrade # pip.exe运行
python -m pip install –upgrade # python.exe运行

Sixth, the prompt in cmd lacks pip, python, conda and other commands

        Add the relevant directory to the path in the system environment variable. When using relevant commands in cmd, it will automatically find relevant exe execution files in the following folders.

7. How to install the environmental dependencies of the GitHub project with one click

1. Enter the cmd command line in the project folder

2. Just run a line of code

        If it fails, use pip install --upgrade to upgrade pip first.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

        Ignore certain dependencies by adding #.

Eight, various conda commands (create a virtual environment, install libraries...)

1. What is the role of anaconda?

        Install their own operating environments for different projects. For example, if a project requires python3.8 and pytorch1.7, then you can create a separate virtual operating environment for this project.

2. Common conda commands

        All commands start with conda and operate under the current folder by default.

conda create -n project1 python=3.9 #创建一个名为project的虚拟环境
conda activate project1
conda install site-packages-name

Guess you like

Origin blog.csdn.net/weixin_44992737/article/details/126015704