I’m trying to use the VL53L1CD with python on an Rpi 3B+. I cloned the repo:
git clone https://github.com/sparkfun/Qwiic_VL53L1X_Py.git
See notes on how I installed the lib below.
I wrote a simple python script, but Example1_ReadDistance.py is essentially the same and gets the same error:
The qwiic drivers are not installed - please check your installation
VL53L1X Qwiic Test
Traceback (most recent call last):
File "/home/pi/github/Qwiic_VL53L1X_Py/examples/Example1_ReadDistance.py", line 61, in <module>
ToF = qwiic.QwiicVL53L1X()
AttributeError: module 'qwiic' has no attribute 'QwiicVL53L1X'
Install:
I tried following the tutorial on the VL53L1X, and installed the python library with:
sudo pip3 install sparkfun-qwiic-vl53l1x
I got confused and did the local install and generally hacked at it before doing the pip3 install. But I think the global install worked. Here’s what pip3 says:
pip3 show sparkfun-qwiic-vl53l1x
Name: sparkfun-qwiic-vl53l1x
Version: 1.0.1
Summary: SparkFun Electronics Qwiic VL53L1X
Home-page: https://www.sparkfun.com/products/14722
Author: SparkFun Electronics
Author-email: info@sparkfun.com
License: MIT
Location: /usr/local/lib/python3.9/dist-packages/sparkfun_qwiic_vl53l1x-1.0.1-py3.9.egg
Requires: sparkfun-qwiic-i2c
Required-by: sparkfun-qwiic
I’m running on a Raspberry Pi 3B, Raspberry Pi OS, uname -r says: 5.10.92-v7+