Open WiJohn opened 1 year ago
you need to :
!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
you can find other python versions using this link : https://repo.anaconda.com/miniconda/
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
you need to split your code into :
a cell for instalation
!pip install roboflow
exit(0) # this will restart your runtime on Colab ( needed for roboflow )
Imports in another cell
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: version
GLIBCXX_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)`
@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
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)
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 请问这个问题 你解决了吗 我也困扰了 好久 可以交流一下吗
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!
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.
!pip install -q condacolab
import condacolab
condacolab.install()
!conda create -n env python=3.9 -y
%%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.
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
After checking all the version correctness, you can train, detect and predict.
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.
please tell me how can i fix this,i am a newbie,sorry for my bad