on my raspberryPi con grovePi module, I updated the python version at 3.6.5 version. Now when I run my app, I have the following error:
python3.6 jhb_app.py
Traceback (most recent call last):
File “jhb_app.py”, line 8, in
import grovepi
File “/usr/local/lib/python3.6/site-packages/grovepi-1.4.1-py3.6.egg/grovepi.py”, line 52, in
ModuleNotFoundError: No module named ‘numpy’
I have the latest version for numpy but I don’t know why I have this issue. Can you help me?
I am not good at python config issues. This is one of the times real python folks often tell me “you should use virtual environments”, but usually I have already messed up the sys environment so always whisper “next time” under my breath.
@alessandro.graps like I hinted at earlier - you probably should not listen to my python configuration advice:
At the bottom of that last screenshot, it says you need to update your pip (or pip3) with
pip install --upgrade pip
but most likely you will need to do this as root though so it would be:
sudo pip install --upgrade pip
Now another disclaimer - I found that Raspbian For Robots is very tightly dependent on Python versions 2.7 and 3.5. If you are trying to upgrade Raspbian For Robots Python compiler to version 3.6, you are probably headed for trouble. You should use virtual environments to run a different version of Python.
Here are my notes from investigating virtual environments:
Virtual Python Environments With Specific Python Versions
Using:
python3 -m venv
Virtual environments are part of the Python3 package (since v3.3)
To create a virtual environment for a project:
$ cd my_project_folder
using the default python3 version and no installed site packages
$ python3 -m venv dir_name (common to use venv for dir_name) or
or to use default python3 version and the installed site packages
thanks for your help. I followed your instructions. Now, when I run my app:
python3 jhb_helmet.py -g False -i False
I have another error:
thread: MainThread exception: module ‘grovepi’ has no attribute ‘read_interrupt_state’
Post-processing (stage 2)…
Building modules…
Building module “mvn”…
Constructing wrapper function “mvnun”…
value,inform = mvnun(lower,upper,means,covar,[maxpts,abseps,releps])
Constructing wrapper function “mvnun_weighted”…
value,inform = mvnun_weighted(lower,upper,means,weights,covar,[maxpts,abseps,releps])
Constructing wrapper function “mvndst”…
error,value,inform = mvndst(lower,upper,infin,correl,[maxpts,abseps,releps])
Constructing COMMON block support for “dkblck”…
ivls
Wrote C/API module “mvn” to file “build/src.linux-armv7l-3.6/scipy/stats/mvnmodule.c”
Fortran 77 wrappers are saved to “build/src.linux-armv7l-3.6/scipy/stats/mvn-f2pywrappers.f”
warning: no previously-included files matching ‘subr.f’ found under directory ‘scipy/linalg/src/id_dist/src’
no previously-included directories found matching ‘benchmarks/env’
no previously-included directories found matching ‘benchmarks/results’
no previously-included directories found matching ‘benchmarks/html’
no previously-included directories found matching ‘benchmarks/scipy’
no previously-included directories found matching ‘scipy/special/tests/data/boost’
no previously-included directories found matching ‘scipy/special/tests/data/gsl’
no previously-included directories found matching ‘scipy/special/tests/data/local’
no previously-included directories found matching ‘doc/build’
no previously-included directories found matching ‘doc/source/generated’
warning: no previously-included files matching ‘~’ found anywhere in distribution
warning: no previously-included files matching '.bak’ found anywhere in distribution
warning: no previously-included files matching ‘.swp’ found anywhere in distribution
warning: no previously-included files matching '.pyo’ found anywhere in distribution
warning: no previously-included files found matching ‘LICENSES_bundled.txt’
resetting extension ‘scipy.odr.__odrpack’ language from ‘c’ to ‘f77’.
Hi, can you assist with this problem? When I’m looking to installation module pyttsx3, I even have this error: FileNotFoundError: [Errno 2] No such report or directory: ‘/System/Library/CoreServices/SystemVersion.Plist’ The GPS code doesn’t appear to training session of the box. Are there any films demonstrating the GPS sensor for GrovePi?