前提・実現したいこと
気圧・温度センサBMP180から、データを取得したいと思っています。
下のリンクを参考にさせていただき、
https://qiita.com/masato/items/d5c19a883b0ba3ec7d5b
GitHubのAdafruitリポジトリからライブラリを持ってきました。
https://github.com/adafruit/Adafruit_Python_BMP
このライブラリにある、’simpletest.py’ というプログラムを実行して値を print しようとしたのですが、次のようなエラーが出ます。ググってもよく分かりませんでした。ご教示よろしくお願いします。
#実行したプログラム
python3
1import Adafruit_BMP.BMP085 as BMP085 2 3sensor = BMP085.BMP085() 4 5while True: 6 print('Temp = {0:0.2f} *C'.format(sensor.read_temperature())) 7 print('Pressure = {0:0.2f} Pa'.format(sensor.read_pressure())) 8 print('Altitude = {0:0.2f} m'.format(sensor.read_altitude())) 9 print('Sealevel Pressure = {0:0.2f} Pa'.format(sensor.read_sealevel_pressure())) 10 print('') 11 sleep(1)
#エラーメッセージ
====================== RESTART: /home/pi/simpletest.py ====================== Warning (from warnings module): File "/usr/lib/python3.5/distutils/dist.py", line 261 warnings.warn(msg) UserWarning: Unknown distribution option: 'long_description_content_type'
補足情報
Raspberry Pi zero でやっています。よろしくお願いします。
「UserWarning: Unknown distribution option: 'long_description_content_type'」というエラーが出ていますが、'long_description_content_type'なんて、構造化されたドキュメントを使う場合に使うものでしょ? 質問に書かれたプログラムのコードでも'long_description_content_type'なんて使っていないし。
使っているコードを見直すことを強くお勧めします。