Comments (8)
I realized something; if I run the command with sudo like sudo python3 tsl2591_simpletest.py
I encounter the error I mentioned above. But it can run without sudo. So, why?
from adafruit_circuitpython_tsl2591.
maybe you have different python libraries installed for root or user 'pi'?
from adafruit_circuitpython_tsl2591.
I installed the libraries Adafruit_Blinka, Adafruit_CircuitPython_BusDevice, Adafruit_CircuitPython_TSL2591 and I made installation like below for each library:
git clone https://github.com/adafruit/Adafruit_CircuitPython_TSL2591.git
cd Adafruit_CircuitPython_TSL2591
sudo python3 setup.py install
I did not choose any virtual environment. But could you please suggest how to check it? Or do you suggest any other installation method please?
from adafruit_circuitpython_tsl2591.
oh dont do that, use pip3
https://learn.adafruit.com/tsl2561/python-circuitpython
follow these instructions, you'll want to uninstall it from the way you did it above
from adafruit_circuitpython_tsl2591.
Thank you for your answer. I uninstall my previous installed libraries, and then installed the following;
sudo pip3 install adafruit-blinka
sudo pip3 install Adafruit_CircuitPython_TSL2591
But I still can run python3 example/tsl2591_simpletest.py
without sudo, but with sudo I encountered the same following error:
sudo python3 tsl2591_simpletest.py
Traceback (most recent call last):
File "tsl2591_simpletest.py", line 14, in <module>
sensor = adafruit_tsl2591.TSL2591(i2c)
File "/usr/local/lib/python3.5/dist-packages/adafruit_tsl2591.py", line 111, in __init__
self._device = i2c_device.I2CDevice(i2c, address)
File "/usr/local/lib/python3.5/dist-packages/adafruit_bus_device/i2c_device.py", line 64, in __init__
i2c.writeto(device_address, b'')
File "/usr/local/lib/python3.5/dist-packages/busio.py", line 63, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File "/usr/local/lib/python3.5/dist-packages/adafruit_blinka/microcontroller/raspi_23/i2c.py", line 38, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
AttributeError: 'SMBus' object has no attribute 'write_bytes'
from adafruit_circuitpython_tsl2591.
maybe try 'sudo pip3 install --upgrade adafruit-blinka'
and also 'sudo pip3 install --upgrade Adafruit-GPIO' and 'sudo pip3 install --upgrade Adafruit-PureIO`
from adafruit_circuitpython_tsl2591.
@berkaysit Hello! Are you still experiencing this issue? Let us know so we can help you out or close this issue. Thanks!
from adafruit_circuitpython_tsl2591.
closing due to lack of activity
from adafruit_circuitpython_tsl2591.
Related Issues (7)
- RuntimeError: Overflow reading light channels! could maybe suggest lowering the gain HOT 3
- Missing Type Annotations
- TSL2591 overflows under direct sunlight despite GAIN_LOW INTEGRATIONTIME_100MS options set HOT 3
- DisplayIO Example Wanted
- ATime not accounted for in Overflow Detection HOT 1
- Equation for Lux calculation does not reflect Library HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_circuitpython_tsl2591.