Frequently Asked Questions¶
We list some common troubles faced by many users and their corresponding solutions here. Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them. If the contents here do not cover your issue, please create an issue using the provided templates and make sure you fill in all required information in the template.
Compatibility issue between MMCV and MMClassification; “AssertionError: MMCV==xxx is used but incompatible. Please install mmcv>=xxx, <=xxx.”
Compatible MMClassification and MMCV versions are shown as below. Please choose the correct version of MMCV to avoid installation issues.
|MMClassification version||MMCV version|
|0.23.2 (master)||mmcv>=1.4.2, \<1.7.0|
dev branch is under frequent development, the MMCV
version dependency may be inaccurate. If you encounter problems when using
dev branch, please try to update MMCV to the latest version.
If you would like to use
albumentations, we suggest using
pip install -r requirements/albu.txtor
pip install -U albumentations --no-binary qudida,albumentations.
If you simply use
pip install albumentations>=0.3.2, it will install
opencv-python-headlesssimultaneously (even though you have already installed
opencv-python). Please refer to the official documentation for details.
Do I need to reinstall mmcls after some code modifications?
If you follow the best practice and install mmcls from source, any local modifications made to the code will take effect without reinstallation.
How to develop with multiple MMClassification versions?
Generally speaking, we recommend to use different virtual environments to manage MMClassification in different working directories. However, you can also use the same environment to develop MMClassification in different folders, like mmcls-0.21, mmcls-0.23. When you run the train or test shell script, it will adopt the mmcls package in the current folder. And when you run other Python script, you can also add
PYTHONPATH=`pwd`at the beginning of your command to use the package in the current folder.
Conversely, to use the default MMClassification installed in the environment rather than the one you are working with, you can remove the following line in those shell scripts: