Comments (3)
I managed to solve it. Just use the normal python installation version, not the python3 version. Debian buster image uses python3 as python, same for pip.
This is my Dockerfile:
FROM arm32v7/python:3.7-slim
ENV PYTHONUNBUFFERED 1
WORKDIR /code/
RUN apt-get update && \
apt-get install -y tcl tk gcc make curl gnupg git && \
echo "deb https://seeed-studio.github.io/pi_repo/ stretch main" | tee /etc/apt/sources.list.d/seeed.list && \
curl https://seeed-studio.github.io/pi_repo/public.key | apt-key add - && \
apt-get update && apt-get install -y python-rpi.gpio python-mraa python-upm && \
git clone https://github.com/Seeed-Studio/grove.py && pip install ./grove.py
COPY ./requirements.txt /code/requirements.txt
RUN pip install --upgrade pip && pip install -r /code/requirements.txt
COPY . /code/
CMD python /code/main.py
I had to install git
and curl
(ignore some libs like tcl
and tk
, those are specific to my project).
from grove.py.
I tried this also on python:3.5-buster image (3.5.9) but this still occur :(
from grove.py.
I found this thread as we're also trying to run a script that makes use of grove.py from within a container. However, the above Docker file isn't working and have been trying to hack with different images, python versions, etc. to no avail.
I'm running a Raspberry Pi 4 with Raspbian GNU/Linux 10 (buster). When I run bash on the container in privileged mode and try running the script, I get:
root@0512ceae4514:/code# python script.py
Traceback (most recent call last):
File "script.py", line 5, in
from grove.factory import Factory
File "/usr/local/lib/python3.7/site-packages/grove/factory/init.py", line 2, in
from .factory import *
File "/usr/local/lib/python3.7/site-packages/grove/factory/factory.py", line 38, in
from grove.temperature import *
File "/usr/local/lib/python3.7/site-packages/grove/temperature/init.py", line 2, in
from .mcp9808 import TemperMCP9808
File "/usr/local/lib/python3.7/site-packages/grove/temperature/mcp9808.py", line 38, in
from upm.pyupm_mcp9808 import MCP9808
ModuleNotFoundError: No module named 'upm'
I confirmed the python-upm package is installed and attempted installing python3-upm and got the same error @darthkurak posted:
root@0512ceae4514:/code# apt install python3-upm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-upm : Depends: libpython3.5 (>= 3.5.0~b1) but it is not installable
E: Unable to correct problems, you have held broken packages.
Any suggestions would be greatly appreciated!
Thanks!!
from grove.py.
Related Issues (20)
- Strip Led is not working HOT 5
- grove_gesture_sensor.py differs from Arduino C Code
- grove water sensor example seems incorrect? HOT 1
- grove_imu_9dof_icm20600_ak09918 module seems to not work HOT 1
- Support for grove led bar on Grove Base Hat HOT 7
- Support for WS2813 RGB LED strips on Jetson Nano
- GPS module only reads US satellites HOT 1
- Can't install Grove lib on Jetson Nano
- Errors when installing on a Raspberry Pi running Bullseye HOT 18
- Unable to install dependencies upm and mraa on Raspberry Pi Bullseye HOT 14
- Interface Grove Ultrasonic Sensor without shield
- Problem in i2c.py opening multiple i2c busses HOT 3
- grove/grove_pwm_buzzer.py missing HOT 1
- Grove-Sunlight_Sensor Missing
- I2C error (Please check if the I2C device insert in I2C of Base Hat)
- Can't Run Examples HOT 7
- I can not RUN Grove KiT on Raspberry Pi 400 and Pi 8GB HOT 2
- ADC of Grove Base Hat not working with reTerminal
- Grove Kit does not install on Raspberry Pi 400 - 8gb HOT 1
- Raspberry Pi 4 and hat not working HOT 2
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 grove.py.