Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A complete setup guide without dependency conflicts #211

Open
tendermonster opened this issue Apr 21, 2023 · 3 comments
Open

A complete setup guide without dependency conflicts #211

tendermonster opened this issue Apr 21, 2023 · 3 comments

Comments

@tendermonster
Copy link

tendermonster commented Apr 21, 2023

Hello,

After fighting with dependency conflicts for a few days, I thought of sharing my final solution with you.
Basically, it is better to play it save and compile every program from source

setup conda env

conda create -n swin_od python=3.8

than clone the repo and cd to the directory

git clone https://github.com/SwinTransformer/Swin-Transformer-Object-Detection
cd Swin-Transformer-Object-Detection

install pytorch using pip instead of conda


most likely you will need to compile mmcv from scratch

git clone https://github.com/open-mmlab/mmcv.git
git switch 1.x # switch to the version that is required
pip install -r requirements/optional.txt
MMCV_WITH_OPS=1 pip install -e . -v
python .dev_scripts/check_installation.py # check the installation

most likely you will need to compile mmdet from scratch

clone mmdet switch to 2.x branch because 3.x branch is incompatible with this project

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
git switch 2.x
pip install -v -e .

verify that mmdet was installed correctly.

  • there will be an example in the docs on how to do it

after that install nvidia apex as fallows:

git clone https://github.com/NVIDIA/apex
cd apex  
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

After that there should not be any dependency conflicts or wired errors :)

@paultreadel
Copy link

Thank you for documenting these steps. I struggled for hours trying to setup this repo until I discovered this. I've now got everything installed with no conflict errors and the demo notebooks are working so I am 😄

@k-arthik-raj
Copy link

Which versions of pytorch, cuda versions did you guys use. Because I am trying with cuda 11.3 and pytorch 1.10.0 and am unable to install mmcv-full 1.3.17 and am struggling to find a solution to make it work with cuda 11.3.

@PRABS25
Copy link

PRABS25 commented Mar 30, 2024

MMCV_WITH_OPS=1 : The term 'MMCV_WITH_OPS=1' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1

  • MMCV_WITH_OPS=1 pip install -e . -v
  •   + CategoryInfo          : ObjectNotFound: (MMCV_WITH_OPS=1:String) [], CommandNotFoundException        
      + FullyQualifiedErrorId : CommandNotFoundException
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants