3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

python モジュールhidapiとhidに注意。

Posted at

TL;DR

pythonモジュールhidapiとhidは
両方ともimport hidで読み込めるので注意。
紛らわしい。

pip install hidapi

でインストール。でも、使うとときは

import hid

hidapi 0.7.99.post21

hid 0.1.1

  • hid 0.1.1は見た所python2系で書かれているが、python3系でpip installをしても入ってしまう。
  • hid 0.1.1が入っていると、import hidすると、hid 0.1.1が優先されるようでhidapi は読み込まれない。

なので、間違えて入れたら、pip uninstall hid

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?