[debug]: An error is reported during the installation of mmcv-full==1.2.4 package

[debug]: The installation of mmcv-full==1.2.4 package process gives an error This error originates from a subprocess, and is likely not a problem with pip

some debug

  1. WARNING: Ignoring invalid distribution -illow (d:\anaconda3\envs\pytorch\lib\site-packages)
    This is because there was a problem in the process of installing the package, which will affect the installation of the existing package. In the given directory, deleting the file with ~ can solve this problem, but the package still cannot be installed successfully.

  2. Look carefully at the error report:OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
    This error means that the CUDA environment variable has not been added, and the library cannot find the path when it is called, so the CUDA environment variable needs to be added.
    CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA...
    It's strange, I can't find this path, it turns out that CUDA is not installed, and CUDA is installed.

  3. Continue to install the package and report an error:DistutilsError: Could not find suitable distribution for Requirement.parse(‘pytest-runner’)
    insert image description here
    Solution:

pip install pytest-runner
  1. continue, error againModuleNotFoundError: No module named 'skbuild
    Execute the command: pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple scikit-build to solve

Dividing line------------------------------------------------ ----------------------------

correct installation method

Method 1: Offline installation

(1) Use the command to view the package types that are compatible with the current python version and platform.

pip debug --verbose

(2) Download mmcv, website: mmcv download
If the website does not have the desired mmcv version, use method 2
(3) Install
pip install download path + package name

Method 2: Use the specified command to install

(1) Check the current cuda and torch version
and use the command directly in python

import torch
print(torch.__version__)

(2) Use the command to install the specified version of mmcv, mmcv_version/cu_version/torch_version according to the mmcv version, cuda version and torch version you want to set
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab. com/mmcv/dist/{cu_version}/{torch_version}/index.html
My cuda version is 11.7, and the torch version is 1.13.0. The command is as follows:

pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13.0/index.html

Reference:
1. warning
2. Several errors in python virtual environment configuration and solutions
3. pip install failed to install, solve the "failed building wheels" problem

Guess you like

Origin blog.csdn.net/gsgs1234/article/details/131441689