hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.83k stars 427 forks source link

ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cu113 (from versions: 1.11.0, 1.11.0+cu113, 1.12.0, 1.12.0+cu113, 1.12.1, 1.12.1+cu113, 1.13.0, 1.13.1, 2.0.0) ERROR: No matching distribution found for torch==1.10.1+cu113 #563

Open WiJohn opened 1 year ago

WiJohn commented 1 year ago

please tell me how can i fix this,i am a newbie,sorry for my bad Screenshot from 2023-05-06 17-49-53

ASSAZZIN-01 commented 1 year ago

you need to :

  1. downgrade the python version
  2. upgrade pip with !pip install pip -U

to downgrade python to 3.9 for example version on colab run this code :

!wget -O mini.sh https://repo.anaconda.com/miniconda/Miniconda3-py39_23.3.1-0-Linux-x86_64.sh
!chmod +x mini.sh
!bash ./mini.sh -b -f -p /usr/local
!conda install -q -y jupyter
!conda install -q -y google-colab -c conda-forge
!python -m ipykernel install --name "py39" --user

image

you can find other python versions using this link : https://repo.anaconda.com/miniconda/

WiJohn commented 1 year ago

Thanks so much for your help I am following this (https://colab.research.google.com/drive/16nRwsioEYqWFLBF5VpT_NvELeOeupURM) to learn how to train yolov5obb but when i go to this step,it was error,please tell me how can i fix it image

ASSAZZIN-01 commented 1 year ago

you need to split your code into :

  1. a cell for instalation

    !pip install roboflow
    exit(0) # this will restart your runtime on Colab ( needed for roboflow ) 
  2. Imports in another cell

liamh1999 commented 1 year ago

I am getting the same error. After trying your solution. could u help me with that also pls ? I'm also a noob. Traceback (most recent call last): File "/content/drive/MyDrive/yolov5_obb/train.py", line 34, in <module> import val # for end-of-epoch mAP File "/content/drive/MyDrive/yolov5_obb/val.py", line 28, in <module> from models.common import DetectMultiBackend File "/content/drive/MyDrive/yolov5_obb/models/common.py", line 16, in <module> import pandas as pd File "/usr/local/lib/python3.9/site-packages/pandas/__init__.py", line 48, in <module> from pandas.core.api import ( File "/usr/local/lib/python3.9/site-packages/pandas/core/api.py", line 47, in <module> from pandas.core.groupby import ( File "/usr/local/lib/python3.9/site-packages/pandas/core/groupby/__init__.py", line 1, in <module> from pandas.core.groupby.generic import ( File "/usr/local/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 76, in <module> from pandas.core.frame import DataFrame File "/usr/local/lib/python3.9/site-packages/pandas/core/frame.py", line 172, in <module> from pandas.core.generic import NDFrame File "/usr/local/lib/python3.9/site-packages/pandas/core/generic.py", line 169, in <module> from pandas.core.window import ( File "/usr/local/lib/python3.9/site-packages/pandas/core/window/__init__.py", line 1, in <module> from pandas.core.window.ewm import ( File "/usr/local/lib/python3.9/site-packages/pandas/core/window/ewm.py", line 15, in <module> import pandas._libs.window.aggregations as window_aggregations ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.29' not found (required by /usr/local/lib/python3.9/site-packages/pandas/_libs/window/aggregations.cpython-39-x86_64-linux-gnu.so)`

liamh1999 commented 1 year ago

@ASSAZZIN-01 u provided python 3.9 in the code snippet but in the screenshot it is 3.8. I have tried the code snippet and it is not working for me

liamh1999 commented 1 year ago

I'm getting the error: running develop running egg_info writing nms_rotated.egg-info/PKG-INFO writing dependency_links to nms_rotated.egg-info/dependency_links.txt writing top-level names to nms_rotated.egg-info/top_level.txt /usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py:381: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'nms_rotated.egg-info/SOURCES.txt' writing manifest file 'nms_rotated.egg-info/SOURCES.txt' running build_ext Traceback (most recent call last): File "setup.py", line 38, in <module> setup( File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/lib/python3.8/site-packages/setuptools/command/develop.py", line 38, in run self.install_for_development() File "/usr/local/lib/python3.8/site-packages/setuptools/command/develop.py", line 140, in install_for_development self.run_command('build_ext') File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run _build_ext.run(self) File "/usr/local/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 404, in build_extensions self._check_cuda_version() File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 781, in _check_cuda_version raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda)) RuntimeError: The detected CUDA version (11.8) mismatches the version that was used to compile PyTorch (11.3). Please make sure to use the same CUDA versions. when running!(cd utils/nms_rotated; python3 setup.py develop)

wei3044 commented 1 year ago

ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cu118 (from versions: 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.0+cu118, 2.0.1, 2.0.1+cu118) ERROR: No matching distribution found for torch==1.10.1+cu118 请问这个问题 你解决了吗 我也困扰了 好久 可以交流一下吗

asalroudbari commented 1 year ago

I'm having the same problem. Even by downgrading the Python version and applying cu118 code, I'm getting the error: ERROR: Could not find a version that satisfies the requirement torch==1.10.1+cu118 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.0+cu118, 2.0.1, 2.0.1+cu118) ERROR: No matching distribution found for torch==1.10.1+cu118

I would appreciate it if any one can help!

FengyiLi1102 commented 1 year ago

I followed the install.md, and used following codes to create a virtual environment with Python==3.9 and successfully installed corresponding torch, torchvision, torchaudio packages.

The working space is colab.

Install conda in the colab

!pip install -q condacolab
import condacolab
condacolab.install()

Create the virtual environment with Python==3.9

!conda create -n env python=3.9 -y

Check your python version

%%bash
source activate env
python --version

⚠️: You need %%bash and source activate env for each cell in order to run the following commond within the proper environment.

Install required torch, torchvision and torchaudio packages.

I found the original downloading page does not contain the required torch package, and searched another one to replace. The rest packages are left without any change.

%%bash
source activate env
pip3 install torch==1.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch/
pip3 install torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
nvcc -V

Set off and Go

After checking all the version correctness, you can train, detect and predict.

Tips

I encountered with a problem of np.int for general.py and datasets.py, and this could be easily solved by just replacing the np.int with np.int32, which may be caused by the version difference for numpy package.