chrisb2 / pi_ina219

This Python library supports the INA219 voltage, current and power monitor from Texas Instruments with a Raspberry Pi using the I2C bus. The intent of the library is to make it easy to use the quite complex functionality of this sensor.
MIT License
114 stars 34 forks source link

The library could not be imported in python >3.4 #6

Closed andreagilardoni closed 6 years ago

andreagilardoni commented 7 years ago

I suggest adding 'Programming Language :: Python :: 3' inside setup.py classifiers instead of 'Programming Language :: Python :: 3.4'

chrisb2 commented 7 years ago

I had a look around and found this https://packaging.python.org/tutorials/distributing-packages/#classifiers which would seem to suggest it should perhaps be:

'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4',

Looking at my Travis build https://travis-ci.org/chrisb2/pi_ina219 I am currently testing 3.4, 3.5 and 3.6 so maybe it should really be:

'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6',

regards, Chris

On Sat, Nov 11, 2017 at 3:38 AM, Andrea Gilardoni notifications@github.com wrote:

I suggest adding 'Programming Language :: Python :: 3' inside setup.py classifiers instead of 'Programming Language :: Python :: 3.4'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chrisb2/pi_ina219/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8dVwCGcFAdnkkhd5lUy_1WQ635pJ41ks5s1F_zgaJpZM4QZpM3 .

chrisb2 commented 7 years ago

I tested installing library on Raspbian Stretch:

python -V gives 2.7.13 sudo pip install pi-ina219 succeeds.

python3 -V gives 3.5.3 sudo pip3 install pi-ina219 succeeds.

Please can you provide more detail on the failure you observed.

thanks, Chris

andreagilardoni commented 7 years ago

The problem occurred while I imported them inside python code. I tested to import it inside of a docker container because I suspect that the problem is my python environment that is broken in some way. Now the import is working. I think I need to do a cleanup of my system.

Sorry to bother and thanks, Andrea.