0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PythonでOpenCVがpipインストールできない問題

Last updated at Posted at 2024-06-02

pipによるOpenCV(現時点の最新バージョン4.9.0.80)インストールが失敗する(Windows10)。

pip install opencv-python(以下のエラーが出る)

Visual Studio 2022をインストールしろと言われる。

********************************************************************************
  scikit-build could not get a working generator for your system. Aborting build.

  Building windows wheels for Python 3.6 requires Microsoft Visual Studio 2022.
  Get it with "Visual Studio 2017":

    https://visualstudio.microsoft.com/vs/

  Or with "Visual Studio 2019":

      https://visualstudio.microsoft.com/vs/

  Or with "Visual Studio 2022":

      https://visualstudio.microsoft.com/vs/

  ********************************************************************************

現時点でVisual Studio 2022ダウンロードしても、うまいことビルドできなかったので、OpenCVのバージョンを指定してインストールしましょう。

pip install opencv-python==4.6.0.66

4.7.0.68以降はビルドされたバイナリがpipで提供されていない(自分でどうにかビルドしないといけない)のが問題の様子。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?