Vibashan / online-da

Official Pytorch Codebase for Towards Online Domain Adaptive Object Detection [WACV 2023]
39 stars 6 forks source link

error: package directory 'projects/PointRend/point_rend' does not exist #6

Open Hongbin98 opened 10 months ago

Hongbin98 commented 10 months ago

Firstly, thanks for your nice work :)

When I try to run python -m pip install -e online-da, I get the error as follows:

Obtaining file:///home/linhb/code/online-da
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/linhb/miniconda3/envs/online_da/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/linhb/code/online-da/setup.py'"'"'; __file__='"'"'/home/linhb/code/online-da/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zk0oo2k4
       cwd: /home/linhb/code/online-da/
  Complete output (8 lines):
  running egg_info
  creating /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info
  writing /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/dependency_links.txt
  writing requirements to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/requires.txt
  writing top-level names to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/SOURCES.txt'
  error: package directory 'projects/PointRend/point_rend' does not exist

Could anyone offer me a hand?

Hongbin98 commented 10 months ago

Has anyone successfully installed this environment? :(

Vibashan commented 10 months ago

Hi @Hongbin98 ,

I successfully installed it on my end, and it appears to be functioning correctly. Could you please share more information about the PyTorch version and CUDA version in your environment?

Hongbin98 commented 10 months ago

First of all, thanks for your reply on time!

My PyTorch version and CUDA version follow your suggestions, i.e., torch 1.9.0 and CUDA 10.2.

When I try to run python -m pip install -e online-da, it fails and throws the mentioned error.

Obtaining file:///home/linhb/code/online-da
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/linhb/miniconda3/envs/online_da/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/linhb/code/online-da/setup.py'"'"'; __file__='"'"'/home/linhb/code/online-da/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zk0oo2k4
       cwd: /home/linhb/code/online-da/
  Complete output (8 lines):
  running egg_info
  creating /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info
  writing /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/dependency_links.txt
  writing requirements to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/requires.txt
  writing top-level names to /tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-zk0oo2k4/detectron2.egg-info/SOURCES.txt'
  error: package directory 'projects/PointRend/point_rend' does not exist

And I have double-checked my gcc and g++ versions, i.e., 7.5.0 < 8.0.0

So I am really confused why I cannot install the environment. However, your method is one of the most important baselines for me and I do need your help to implement it~@Vibashan

Vibashan commented 10 months ago

Thank you for your interest in our work. To troubleshoot effectively, could you kindly clarify the following points:

  1. Have you attempted to install the original detection repository with the current versions of PyTorch and CUDA?
  2. Have you explored the option of upgrading PyTorch to versions compatible with CUDA 11.1 or 11.3 and then attempted to install the online-da repository?
Hongbin98 commented 10 months ago

Thank you for your interest in our work. To troubleshoot effectively, could you kindly clarify the following points:

  1. Have you attempted to install the original detection repository with the current versions of PyTorch and CUDA?
  2. Have you explored the option of upgrading PyTorch to versions compatible with CUDA 11.1 or 11.3 and then attempted to install the online-da repository?
  1. Yes. I did try to install the original detection repository step by step as 'Installation Instructions'. Also, I have tried to install this repository on different machines[based on python3.6 and 3.7] but I encountered the same question.
  2. No. Since I am not sure whether this repository could perform well in higher version PyTorch compatible with CUDA 11.1 or 11.3, I am very willing to try it if you could provide me more details
Vibashan commented 10 months ago

You can try the following two versions of pytorch and cuda versions to quickly verify:

  1. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  2. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=11.3 -c pytorch -c conda-forge
Hongbin98 commented 10 months ago

You can try the following two versions of pytorch and cuda versions to quickly verify:

  1. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  2. conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=11.3 -c pytorch -c conda-forge

I notice that these commands are used to install torch 1.8.x which is different from 'Installation Instructions'[requires torch1.9.0]. And I would try them now~

Hongbin98 commented 10 months ago

@Vibashan When I try to follow your suggestion to install the requirements, I encounter this error

ERROR: Could not find a version that satisfies the requirement mkl-fft==1.3.0 (from versions: 1.0.0.17, 1.0.2, 1.0.6)
ERROR: No matching distribution found for mkl-fft==1.3.0

These are my install steps:

conda create -n online_da python=3.6

conda activate online_da

conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge

cd online-da
pip install -r requirements.txt  --> this step throws an error

I know it could be fixed by installing a lower version mkl-fft. But it is possible to lead to some unknown bugs, like the error when I try to run python -m pip install -e online-da

Hongbin98 commented 10 months ago

@Vibashan My question is: Does the requirements.txt maybe rely on another version of python3.X in your environment? Because based on python 3.6.X, I am unable to install all packages which totally match your docs.

Hongbin98 commented 10 months ago

@Vibashan I try to comment out the error package to continue to install. And I found that these package would lead to errors:

certifi==2021.5.30

pycocotools==2.0.2

mkl-fft==1.3.0

mkl-random==1.1.1

mkl-service==2.3.0

I wonder if you generate the requirements.txt by pip freeze > requirements.txt? I used to try this command in my project but it encountered errors.

zss313 commented 9 months ago

我也遇到了同样的错误

当我尝试运行时,出现如下错误:python -m pip install -e online-da ERROR: Command errored out with exit status 1: Complete output (8 lines): running egg_info creating /tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info writing /tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info/dependency_links.txt writing requirements to /tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info/requires.txt writing top-level names to /tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-syal1tg9/detectron2.egg-info/SOURCES.txt' error: package directory 'projects/PointRend/point_rend' does not exist

reazmoj commented 1 month ago

@Hongbin98 You can copy the whole project folder from detectron2 repo and place it in the your project directory just remember change folders path in setup.py file.