Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Issue: ImportError downloading dataset due to unsupported ultralytics version

オープン
#251 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

Version.download メソッドの yolov8 ブランチから始め、print_warn_for_wrong_dependencies_versions が ultralytics の要件をどのように処理しているかを調査します。現在の厳密なバージョンチェックと、報告されている ask_to_continue の動作を比較し、そのうえで、より新しい ultralytics バージョンでもデータセットのダウンロードが完了する一方、デプロイメント互換性の警告が正確なままであることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Description

When attempting to download a dataset using Roboflow's Python package, an ImportError occurs due to a dependency version mismatch with the ultralytics package.

Steps to Reproduce

Click on custom train option and execute recommended code using Roboflow's API:

from roboflow import Roboflow
rf = Roboflow(api_key="MY_API_KEY")
project = rf.workspace("myworkspace").project("myproject")
version = project.version(1)
dataset = version.download("yolov8")
Expected Behavior

The dataset should download without any issues, and the script should handle dependencies smoothly, even with newer versions of ultralytics.

Actual Behavior

The script throws an ImportError, stating a dependency version mismatch:

loading Roboflow workspace...
Dependency ultralytics==8.0.196 is required but found version=8.2.2, to fix: `pip install ultralytics==8.0.196`
Proposed Solution

It would be beneficial for compatibility and future-proofing to support newer versions of ultralytics or at least allow the downloading with a version warning. If possible, updating the dependency requirements or making the version checks more flexible could resolve this issue.

Temporary solution

I added the ask_to_continue argument and set it to True in Version.download method:

...
if model_format == "yolov8":
    # if ultralytics is installed, we will assume users will want to use yolov8 and we check for the supported version  # noqa: E501 // docs
    try:
        import_module("ultralytics")
        print_warn_for_wrong_dependencies_versions([("ultralytics", "==", "8.0.196")], ask_to_continue=True)
    except ImportError:
        print(
            "[WARNING] we noticed you are downloading a `yolov8` datasets but you don't have `ultralytics` installed. "  # noqa: E501 // docs
            "Roboflow `.deploy` supports only models trained with `ultralytics==8.0.196`, to intall it `pip install ultralytics==8.0.196`."  # noqa: E501 // docs
        )
        # silently fail
        pass
...
loading Roboflow workspace...
loading Roboflow project...
Dependency ultralytics==8.0.196 is required but found version=8.2.2, to fix: `pip install ultralytics==8.0.196`
Would you like to continue with the wrong version of ultralytics? y/n: y

Dataset is downlaoded

Additional Information

Python Version: 3.10
Operating System: Windows 10
ultralytics Version: 8.2.2

Thanks :)

主要言語
Python
スター
633
フォーク
141
平均マージ
1日 19時間
マージ済み PR(30日)
14

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

roboflow/roboflow-python のほかの issue

roboflow/roboflow-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。