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

The file _C.cpython-310-x86_64-linux-gnu.so cannot work with my environments. #2

Open
Leeinsn opened this issue Sep 6, 2023 · 5 comments

Comments

@Leeinsn
Copy link

Leeinsn commented Sep 6, 2023

After running the code python setup.py develop, I tried to run bash test_RRDB_RealCEx4.sh to test the model, but I get the errors information as following... I suppose the problem is that Real-CE/basicsr/ops/_C.cpython-310-x86_64-linux-gnu.so does not support my environment. However, I do not know what to do to recompile the corresponding .cpp file. Could you please open source the details about that. Thank you!

Traceback (most recent call last): File "/mnt/lustre/lihao5/Real-CE/basicsr/test.py", line 5, in <module> from basicsr.data import build_dataloader, build_dataset File "/mnt/lustre/lihao5/Real-CE/basicsr/__init__.py", line 3, in <module> from .archs import * File "/mnt/lustre/lihao5/Real-CE/basicsr/archs/__init__.py", line 16, in <module> _arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames] File "/mnt/lustre/lihao5/Real-CE/basicsr/archs/__init__.py", line 16, in <listcomp> _arch_modules = [importlib.import_module(f'basicsr.archs.{file_name}') for file_name in arch_filenames] File "/mnt/cache/lihao5/miniconda3/envs/realce/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/mnt/lustre/lihao5/Real-CE/basicsr/archs/srresnet_arch.py", line 9, in <module> from basicsr.ops.roi_align_rotated import ROIAlignRotated File "/mnt/lustre/lihao5/Real-CE/basicsr/ops/roi_align_rotated.py", line 7, in <module> from basicsr.ops import _C ImportError: /mnt/lustre/lihao5/Real-CE/basicsr/ops/_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops4view4callERKNS_6TensorEN3c108ArrayRefIlEE phoenix-srun: error: SH-IDC1-10-198-6-143: task 0: Exited with exit code 1

@mjq11302010044
Copy link
Owner

@Leeinsn If you are not working at python 3.10+Cuda 11.3+pytorch 1.12, please remove the .so file and recompile the CUDA code of DCN and other sources under your own environment. Please see the BasicSR repo for more installation details.

@Leeinsn
Copy link
Author

Leeinsn commented Sep 6, 2023

The part you pointed out is normal. The problem lies in RealCE/basicsr/ops/roi_align_rotated.py where from basicsr.ops import _C is used. This is not compiled in the setup.py file under the current main branch. However, I noticed that this part of ROIAlignRotated comes from detectron2. So, you can solve this problem by cloning detectron2 and executing python setup.py develop.
image

@mjq11302010044
Copy link
Owner

That's fine. This part will not be used in this repo currently, and we will remove and refactor the code in the near future. Anyway, thanks for pointing out this problem :)

@649459021
Copy link

The part you pointed out is normal. The problem lies in RealCE/basicsr/ops/roi_align_rotated.py where from basicsr.ops import _C is used. This is not compiled in the setup.py file under the current main branch. However, I noticed that this part of ROIAlignRotated comes from detectron2. So, you can solve this problem by cloning detectron2 and executing python setup.py develop. image

Hi, could you please describe in detail how you solved this problem?

I run the following commands:

python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
python setup.py develop

But there is an Error:

Traceback (most recent call last):
  File "/data/Real-CE/setup.py", line 140, in <module>
    write_version_py()
  File "/data/Real-CE/setup.py", line 69, in write_version_py
    with open('VERSION', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'VERSION'

@eblis88
Copy link

eblis88 commented Jan 17, 2024

649459021

you need reinstall BasicSR through pip install basicsr.

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