群馬県でPythonを使ったAIやシステムを開発しているファントム

Navigation
群馬県でPythonを使ったAIやシステムを開発しているファントム

群馬県でPythonを使ったAIやシステムを開発しているファントムです。企業の経営課題を最適なテクノロジーで解決します。テックブログではPythonを中心にプログラミングに役立つ情報を発信しています。

投稿を検索する


  • 株式会社ファントム コーポレートサイト

カテゴリー



  • AWS 16
  • Django 45
  • FastAPI 4
  • Flask 8
  • GCP 1
  • Information 37
  • Other 32
  • PHP 2
  • Python 93
  • Pythonista 3
  • Rust 1

タグ


Alembic API argparse Beautiful Soup black Channels charset CodeCommit datetime Django REST framework Docker enumerate f-string git GitHub glob Google Colaboratory i18n IAM Internship Jupyter Lambda Matplotlib Nginx OpenCV pandas PIL Pillow PostgreSQL PyCharm PyCon pyenv PyTorch Redis Rembg ReportLab requests S3 Sentry slack tqdm uWSGI venv Vue.js youtube
このサイトはreCAPTCHAによって保護されており、Googleのプライバシーポリシーと利用規約が適用されます。

© 2022 Fantom, Inc.

Hydra WordPress Theme by EckoThemes.

Published with WordPress.

Related Articles

Filter by Category

  • Python(93)
  • Django(45)
  • Information(37)
  • Other(32)
  • AWS(16)
  • Flask(8)
  • FastAPI(4)
  • Pythonista(3)
  • PHP(2)
  • GCP(1)
  • Rust(1)

Filter by Author

  • EIGHT (14)
  • hayai017 (2)
  • press (196)
Back to Latest Articles
Python

Raspberry PiにInsightFaceをインストールできなかった

Raspberry PiにInsightFaceをインストールできなかった 顔検出や顔認証、属性判定ができるInsightFaceというライブラリを使ってRaspberry Piで属性判定に挑戦しましたが、結果的にRas […]

Posted on 21st 9月 2022 by press

Python

WindowsでPythonの仮想環境を構築

WindowsでPythonの仮想環境を構築 Pythonで開発するときはMac版のPyCharmを使用しているので仮想環境も自動でPyCharmが構築してくれるのですが、Apple SiliconのMacでは動かないラ […]

Posted on 20th 9月 2022 by press

AWS

AWSで追加したユーザのMFAに1Passwordを設定

AWSで追加したユーザのMFAに1Passwordを設定 AWSのコンソールにログインする際にMFA(Multi-Factor Authentication)という多要素認証を設定することで、メールアドレスとパスワードに […]

Posted on 14th 9月 2022 by press

Python

iPhoneで撮影した写真をPythonでpngに変換

iPhoneで撮影した写真をPythonでpngに変換 iPhoneで撮影した写真はHEICという拡張子で保存されます。この画像を利用したり編集したりするにはpngなどの形式に変換が必要なので画像が大量にある場合は1枚1 […]

Posted on 5th 9月 2022 by press

Python

Appleシリコン搭載MacのDocker環境でTensorflowを使う

Appleシリコン搭載MacのDocker環境でTensorflowを使う Intel搭載のMacで作成したTensorflowを使ったプロジェクトを移して、M1やM2などのAppleシリコンを搭載しているMacでTen […]

Posted on 30th 8月 2022 by press

Python

PythonでYouTubeの動画をダウンロード

PythonでYouTubeの動画をダウンロード YouTubeの動画をPythonでダウンロードします。今回使うyt-dlpはyoutube-dlのフォークで、youtube-dlよりもダウンロード速度が高速です。Py […]

Posted on 7th 8月 2022 by press

Python

Pythonでjpgやpng画像をwebpに一括変換

Pythonでjpgやpng画像をwebpに一括変換 ウェブサイトで使用される画像に画質を保ったまま軽量化できるWebサイト向けの次世代画像フォーマットのwebpを利用するケースが増えていますが、サイト内で使われている画 […]

Posted on 7th 8月 2022 by press

Other

Apple silicon Macでmxnetを使えるようになるまで

Apple silicon Macでmxnetを使えるようになるまで エラーが発生したのでpip install mxnet-mkl/mxnet-cu90mkl --preしたところ以下のエラーが発生 エラーの中に上の内 […]

Posted on 26th 7月 2022 by press

Other

Gitで別のブランチから特定のファイルorディレクトリをチェックアウト

Gitで別のブランチから特定のファイルorディレクトリをチェックアウト 複数人での開発や細かくブランチを作って開発していると、別ブランチの一部分だけを今のブランチに取り込みたいということがあります。マージだと取り込みたく […]

Posted on 5th 7月 2022 by press

Python

サッカーコートの白線を抽出する

次のようなサッカーコートの白線の部分を線分としてを抽出したい。 まず考えたのは、緑色か否かで判定して白黒画像にすることだ。白黒画像にすることで、線をより明確に可視化させることができ、その後エッジだけ抽出して線分判定をすれ […]

Posted on 14th 6月 2022 by EIGHT

Python

pyenvでインストールしたPythonのバージョンを更新する

pyenvでインストールしたPythonのバージョンを更新する pyenvで最新のPythonをインストールしようとしたところ、pyenvのバージョンが古く最新のバージョンがリストになかったので、pyenvをアップデート […]

Posted on 14th 6月 2022 by press

Django

DockerとDjangoでマイグレーションコマンドを実行するとエラーになる

DockerとDjangoでマイグレーションコマンドを実行するとエラーになる Docker環境で構築したDjangoプロジェクトでマイグレーションコマンドを実行した際に、docker-compose.ymlとsettin […]

Posted on 13th 6月 2022 by press

Other

GitHubのイシューとPyCharmのタスクを連携

GitHubのイシューとPyCharmのタスクを連携 GitHubのイシューとPyCharmのタスクを連携させて、GitHubのイシューをPyCharmに表示させる設定方法です。画面を切り替えなくても追加されたGitHu […]

Posted on 2nd 6月 2022 by press

Python

BERT+UMAPを実装した

https://shuhoyo.hatenablog.com/entry/nogizaka46-lyrics-nlp 上記サイトを参考にBERT+UMAPを実装してみた。 BERTとは BERTとは自然言語処理の1手法の […]

Posted on 31st 5月 2022 by EIGHT

Django

DjangoでPOSTとGETを組み合わせたパラメータでリダイレクト

DjangoでPOSTとGETを組み合わせたパラメータでリダイレクト DjangoでPOSTを使ったリダイレクトはよく事例が見つかりますが、POSTとGETを組み合わせたURLにリダイレクトさせる情報があまりなかったので […]

Posted on 30th 5月 2022 by press

Python

WordCloudを導入した

WordCloudとは 文章に頻出する単語を抽出して画像に出力するシステムのこと。 実装について 形態素分析 まず形態素分析する必要がある。最新の形態素分析はJUMAN++なのでそれを導入すべし。 インストールするのは簡 […]

Posted on 24th 5月 2022 by EIGHT

Django

PyCharmでPostgreSQLをGUIから操作する設定

PyCharmでPostgreSQLをGUIから操作する設定 PyCharmでDjangoのPostgreSQLをGUIで操作するための設定方法です。Djangoには管理サイトが用意されていますが、プログラムの実行中にデ […]

Posted on 10th 5月 2022 by press

Python

仮想環境でかなり困った

下記のdeep fakeを導入しようとしたら仮想環境作成でかなり困ったので記録しておく。 https://knowledge.sakura.ad.jp/26769/ 試したこと Docker まずdockerでpytho […]

Posted on 9th 5月 2022 by EIGHT

Other

リモートのファイルをローカルのデスクトップにコピー

リモートのファイルをローカルのデスクトップにコピー リモートサーバーにSSH鍵でログインして、ファイルをローカルのマシンにコピーする方法です。今回はリモートサーバーにダンプしたsqlファイルをデスクトップにコピーします。 […]

Posted on 5th 5月 2022 by press

Python

Pythonのenumerate関数でfor文のインデックスを取得

Pythonのenumerate関数でfor文のインデックスを取得 enumerate関数を使うとPythonでforを書くときに処理毎にカウントアップしたり、値を代入したりといった処理が簡単にできるので便利です。 実際 […]

Posted on 29th 3月 2022 by press

View Latest Posts
Python

Raspberry PiにInsightFaceをインストールできなかった


press
Raspberry PiにInsightFaceをインストールできなかった
Posted on 21st 9月 2022 by press
2024年度 インターンシップ 募集開始

Raspberry PiにInsightFaceをインストールできなかった

顔検出や顔認証、属性判定ができるInsightFaceというライブラリを使ってRaspberry Piで属性判定に挑戦しましたが、結果的にRaspberry PiにInsightFaceがインストールできず断念しました。

途中までは順調にエラーを解消できていましたが、Failed building wheel for ninjaというエラーが発生してからは対処しても繰り返し同じエラーが発生してしまい、先に進めず断念しました。

プログラムを実行した際に出た初めのエラー

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

libatlas-base-devをインストールします(aptコマンドはsudoをつけないと実行できませんでした)

sudo apt install libatlas-base-dev

numpyのエラーが発生しました

ImportError: numpy.core.multiarray failed to import

numpyをアップグレードします

pip install numpy --upgrade

プログラムを実行するとinsightfaceがインストールされてないとエラーが発生しました

ModuleNotFoundError: No module named 'insightface'

pipでinsightfaceをインストールします

pip install insightface

以下のエラーが発生しました

          assert CMAKE, "Could not find cmake executable!"
      AssertionError: Could not find cmake executable!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

cmakeをインストールします

sudo apt install cmake

もう一度insightfaceをインストールします

pip install insightface

以下のエラーが発生しました

①

AttributeError: module 'numpy' has no attribute 'get_include'
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for ninja
      Failed to build ninja
      ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

ネットでいろいろ探し回った結果pipなどをアップグレードしました

pip install --upgrade pip setuptools wheel

もう一度ライブラリをインストールします

pip install insightface

また同じエラーが発生しました

①

AttributeError: module 'numpy' has no attribute 'get_include'
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for ninja
      Failed to build ninja
      ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

numpyをアンインストールしてから再インストールします

pip uninstall numpy
pip install numpy
pip install numpy --upgrade

また①のエラーが発生してnumpyのアンインストール、インストール、アップグレードの繰り返し…

Failed building wheel for ninjaと出てるので解決方法を調べてみましたが見つからず断念しました。

ファントムYouTubeチャンネル

株式会社ファントムへのお問い合わせ

群馬県でPythonを使ったAIやソフトウェアを開発している株式会社ファントムが運営しています。




    press
    • InsightFace
    • RaspberryPi
    • Share Article:
    • Twitter
    • Facebook
    • Pinterest
    • LinkedIn
    • Reddit

    Related Articles

    Django

    DjangoでDateTimeFieldが今日のデータを取得する方法

    Djangoのモデル上でDateTimeField型のデータが今日の日付のデータを取得する方法です。 1つ目00:00:00から23:59:59までの範囲を条件に取得します。 2つ目今日の日付が含まれるものを条件に取得し […]

    Posted on 26th 4月 2019 by press
    Python

    Pythonでディレクトリ内のファイルを取得する

    globモジュールを使いディレクトリ内にあるファイルを取得する方法です。 ディレクトリ構造 まずはディレクトリ内のjpgを全て取得します。 directory = (os.getcwd())で現在のディレクトリのパスを取 […]

    Posted on 26th 4月 2019 by press