Many of the people who have obtained the AIY are newcomers and will not be familiar with the wonderful world of Git. The article in MagPi regarding how to put the AIY kit together was very detailed and did a great job of holding peoples hands.
The next hurdle for newcomers will be updating the software - Would it be possible to provide some guidance regrading how to:
The steps would be:
git add -m "<describe your change> src/action.py
git pull --rebase
Now due to the nature of having everything in one file, one most likely get merge conflicts :/ See #45 for the plan forward.
For the record, I have a blog post I am posting today to simplify how to update.
Needs a bit more proof reading first... I'll come back to post it here.
@sheridat Published.
http://eduncan911.com/stem/embedded/aiy-google-assistant-upgrades-may-2017.html
@eduncan911 Please tell your kids that your a gentleman and a scholar. Thank You so much for this - I've posted a link to it from the Raspberrypi.org forum for AIY.
@sheridat np. i've been meaning to this for a while, and this was an opportunity to sit down and kick it off.
i've tried registering at raspberrypi.org last week to help those with issues upgrading. but alas, their registration system never sent me an email.
FAQs says "contact an Administrator for help during registration."
Help page says, "contact an Administrator for help."
Forum software developers says, "contact an Administrator for help."
Problem is, the only way to view the Team or admins - is with an account.
If you could drop them a line, give them my username "eduncan911", that would help.
Hi, sent them an email and copied you in. If you don't heart from them get
back to me and I will see if there is another route.
Terry
On Tue, May 30, 2017 at 9:33 PM, Eric Duncan notifications@github.com
wrote:
@sheridat https://github.com/sheridat np. i've been meaning to this for
a while, and this was an opportunity to sit down and kick it off.i've tried registering at raspberrypi.org last week to help those with
issues upgrading. but alas, their registration system never sent me an
email.FAQs says "contact an Administrator for help during registration."
Help page says, "contact an Administrator for help."
Forum software developers says, "contact an Administrator for help."
Problem is, the only way to view the Team or admins - is with an account.
If you could drop them a line, give them my username "eduncan911", that
would help.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/aiyprojects-raspbian/issues/72#issuecomment-304999629,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYg3GK31brPwE2tiwDkt-aGnZ3aqvVjkks5r_H0WgaJpZM4NqCqt
.
Hi, I followed the guidance in your blog.
At the step /scripts/install-deps.sh I got and error - the trace is below - in desperation I changed that line to sudo /scripts/install-deps.sh - it chucked out a message that it has to be run in pi - but it carried on and worked.
Running virtualenv with interpreter /home/pi/voice-recognizer-raspi/env/bin/python3
Please use the system python to run this script
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 2328, in
main()
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 713, in main
symlink=options.symlink)
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 925, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/home/pi/voice-recognizer-raspi/env/lib/python3.4/posixpath.py", line 357, in abspath
if not isabs(path):
File "/home/pi/voice-recognizer-raspi/env/lib/python3.4/posixpath.py", line 63, in isabs
return s.startswith(sep)
AttributeError: 'NoneType' object has no attribute 'startswith'
First, don't use sudo. That may install the python dependencies as system packages, which is not what you want here because the voice-recognizer project runs under its own version of packages (the env/bin directory has its own version of the packages). It didn't hurt anything. Just run it again without thesudo.
I am not sure where you are seeing this error. It's a python error, but the only python command in that shell script is:
env/bin/pip install -r requirements.txt
Try this:
cd ~/voice-recognizer-raspi
env/bin/pip install -r requirements.txt
And see if that completes. If so, run scripts/install-deps.sh again. If it still errors:
cd ~/voice-recognizer-raspi/scripts
install_deps.sh
Shouldn't have to though.
@sheridat, @eduncan911: I got that error when I ran install-deps.sh from inside the "dev terminal". Currently it's designed to be run just once from a normal terminal.
Possible fix:
install-deps.sh to avoid recreating the virtualenv if it already existsinstall-deps.sh before activateJust re ran it again without sudo and got the failure again - trace below.
So did
cd ~/voice-recognizer-raspi
env/bin/pip install -r requirements.txt
which worked
ran scripts/install-deps.sh again - failed again
did
cd ~/voice-recognizer-raspi/scripts
install_deps.sh
that failed with the same thing
scripts/install-deps.sh
Reading package lists... Done
Building dependency tree
Reading state information... Done
alsa-utils is already the newest version.
ntpdate is already the newest version.
python3-all-dev is already the newest version.
python3-numpy is already the newest version.
python3-pip is already the newest version.
python3-pysocks is already the newest version.
python3-scipy is already the newest version.
python3-virtualenv is already the newest version.
rsync is already the newest version.
sox is already the newest version.
libttspico-utils is already the newest version.
python3-rpi.gpio is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already up-to-date: pip in /usr/local/lib/python3.4/dist-
packages
Requirement already up-to-date: virtualenv in /usr/local/lib/python3.4/dist-
packages
Running virtualenv with interpreter /home/pi/voice-recognizer-
raspi/env/bin/python3
Please use the system python to run this script
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 2328,
in
main()
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 713, in
main
symlink=options.symlink)
File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 925, in
create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/home/pi/voice-recognizer-raspi/env/lib/python3.4/posixpath.py",
line 357, in abspath
if not isabs(path):
File "/home/pi/voice-recognizer-raspi/env/lib/python3.4/posixpath.py",
line 63, in isabs
return s.startswith(sep)
AttributeError: 'NoneType' object has no attribute 'startswith'
On Wed, May 31, 2017 at 2:16 PM, Eric Duncan notifications@github.com
wrote:
First, don't use sudo. That may install the python dependencies as system
packages, which is not what you want here because the voice-recognizer
project runs under its own version of packages (the env/bin directory has
its own version of the packages). It didn't hurt anything. Just run it
again without thesudo.I am not sure where you are seeing this error. It's a python error, but
the only python command in that shell script is:env/bin/pip install -r requirements.txt
Try this:
cd ~/voice-recognizer-raspi
env/bin/pip install -r requirements.txtAnd see if that completes. If so, run scripts/install-deps.sh again. If
it still errors:cd ~/voice-recognizer-raspi/scripts
install_deps.shShouldn't have to though.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/aiyprojects-raspbian/issues/72#issuecomment-305183250,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYg3GDA3yvV_7-Eh3WyajGaJt22kaOnUks5r_Wg7gaJpZM4NqCqt
.
@drigz @eduncan911
HI could you hold my hand a bit more - do you mean from inside the dev terminal rather than running this sequence
cd ~/assistant-sdk-python
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi
source env/bin/activate
scripts/install-deps.sh
I should run the first two updates as is - and the
cd ~/voice-recognizer-raspi
scripts/install-deps.sh
source env/bin/activate
Thank You both for your help
@drigz thanks for the input!
Thinking back, yeah I did delete the env virtualenv a few times as I was upgrading and moving things around. I'll submit a PR tweak for that here as the open PRs and other commits seem to be modifying this install_deps.sh file for the primary source of dependencies going forward (think system packages installs, as well as pip installs). Makes sense to keep it all here, though I would think it belongs in the root directory.
I do everything via ssh remotely, no Dev Console.
I didn't think activating the virtualenv would be an issue before running install_deps.sh (just good practice to keep someone always in a virtualenv - especially if they don't know Python and opening/closing terminals). Within install_deps.sh it runs sudo pip3 for system wide packages, and then purposely runs env/bin/pip for install in that location. But you may be right that it is conflicting.
What if I modified the install_deps.sh to activate the virtualenv, instead of running env/bin/pip?
That way, it continues with best practices and doesn't confuse newcomers trying to read what that script does (I actually didn't know you could run env/bin/pip install like that without a virtualenv until I saw that script in this repo - always thought you had to activate the virtualenv).
What about a Makefile?
I could throw one together as well, that would also include git pull and such.
make install
make upgrade
make run
Kind of thing.
@sheridat
Sorry you having so much trouble as the upgrade process was a summation of my, troubles, getting things upgraded. Yes, I think @drigz is correct that the directory already exists.
This will work (close your terminal and start over).
I see the "OK Google" hotwording has been merged in! I just ran through these scripts and it worked:
_(yes, git pull the latest always - this is especially important for the voice-recognizer-raspi directory to do very very often)_
cd ~/assistant-sdk-python
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi
git checkout master
git pull origin master
cd ~/voice-recognizer-raspi
rm -rf env
scripts/install-deps.sh
And follow the rest of my blog post to enable hot wording and so on.
Also, I noticed the install script doesn't copy the new config files. This is preferred, yes, so it doesn't override your existing config files.
But, if you want the latest config, you may want to:
cp ~/.config/status-led.ini ~/.config/status-led.ini~
cp config/status-led.ini.default ~/.config/status-led.ini
cp ~/.config/voice-recognizer.ini ~/.config/voice-recognizer.ini~
cp config/voice-recognizer.ini.default ~/.config/voice-recognizer.ini
And then open the config files and edit them again to your liking (e.g. ok-google option).
@eduncan911
I didn't think activating the virtualenv would be an issue before running install_deps.sh
The problematic command is virtualenv ..., which doesn't like being called inside a virtualenv. If we protect this with:
if [[ ! -d env ]] ; then
virtualenv ...
fi
then it should be safe in both cases.
What about a Makefile?
I'd lean towards not to adding an "official" update procedure (eg Makefile) until we have a plugin system, as it'll lead to merge conflicts that are hard for beginners to deal with. However, maybe it would be safe if fails early early in "non-vanilla" situations (ie you've made your own commits, so master != origin/master) rather than breaking your files with merge conflicts.
One more quicky please
I am about to do the sequence suggested - from "inside" a dev terminal
The bit that is
cd ~/voice-recognizer-raspi
rm -rf env
scripts/install-deps.sh
I am wondering whether - rm -rf env is deleteing the dev terminal that
I am working in? Should I come out of the dev terminal and use an
ordinary terminal session to do the above three commands? i am making
this up as I go along
On Wed, May 31, 2017 at 3:23 PM, Eric Duncan notifications@github.com
wrote:
@drigz https://github.com/drigz thanks for the input!
Thinking back, yeah I did delete the env virtualenv a few times as I was
upgrading and moving things around. I'll submit a PR tweak for that here
as the open PRs and other commits seem to be modifying this
install_deps.sh file for the primary source of dependencies going forward
(think system packages installs, as well as pip installs). Makes sense to
keep it all here, though I would think it belongs in the root directory.I do everything via ssh remotely, no Dev Console.
I didn't think activating the virtualenv would be an issue before running
install_deps.sh (just good practice to keep someone always in a virtualenv
- especially if they don't know Python and opening/closing terminals).
Within install_deps.sh it runs sudo pip3 for system wide packages, and
then purposely runs env/bin/pip for install in that location. But you may
be right that it is conflicting.What if I modified the install_deps.sh to activate the virtualenv,
instead of running env/bin/pip?That way, it continues with best practices and doesn't confuse newcomers
trying to read what that script does (I actually didn't know you could run env/bin/pip
install like that without a virtualenv until I saw that script in this
repo - always thought you had to activate the virtualenv).What about a Makefile?
I could throw one together as well, that would also include git pull and
such.make install
make upgrade
make runKind of thing.
@sheridat https://github.com/sheridat
Sorry you having so much trouble as the upgrade process was a summation of
my, troubles, getting things upgraded. Yes, I think @drigz
https://github.com/drigz is correct that the directory already exists.This will work (close your terminal and start over).
I see the "OK Google" hotwording has been merged in! I just ran through
these scripts and it worked:(yes, git pull the latest always - this is especially important for the
voice-recognizer-raspi directory to do very very often)cd ~/assistant-sdk-python
git checkout master
git pull origin mastercd ~/voice-recognizer-raspi
git checkout master
git pull origin mastercd ~/voice-recognizer-raspi
rm -rf env
scripts/install-deps.shAnd follow the rest of my blog post to enable hot wording and so on.
Also, I noticed the install script doesn't copy the new config files. This
is preferred, yes, so it doesn't override your existing config files.But, if you want the latest config, you may want to:
cp ~/.config/status-led.ini ~/.config/status-led.ini~
cp config/status-led.ini.default ~/.config/status-led.ini
cp ~/.config/voice-recognizer.ini ~/.config/voice-recognizer.ini~
cp config/voice-recognizer.ini.default ~/.config/voice-recognizer.iniAnd then open the config files and edit them again to your liking (e.g.
ok-google option).—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/aiyprojects-raspbian/issues/72#issuecomment-305202298,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYg3GAwwyHhmVwGGB9twdYeKAw-gaZ-xks5r_XfEgaJpZM4NqCqt
.
i don't think it would hurt anything. env/ is just the local packages installed for the python app to use. It gets built from the original scripts/install-deps.sh execution you did a while ago.
I've deleted mine several times (just did it again before posting my last comment, to ensure it works). and then rebuilt it with scripts/install-deps.sh.
I do everything from a non-Dev terminal (actually, remotely as I ssh in). So if you run into any issues, yeah close the Dev terminal and run a normal one.
Btw, I updated the blog post...
Added everything we talked about here.
Also added a new section on the latest Config File changes, and how to update them.
ur a star.
On Wed, May 31, 2017 at 3:52 PM, Eric Duncan notifications@github.com
wrote:
Btw, I updated the blog post...
Added everything we talked about here.
Also added a new section on the latest Config File changes, and how to
update them.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/aiyprojects-raspbian/issues/72#issuecomment-305211456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYg3GO6LrBatSPjK1IJwvijGdD7qw_-dks5r_X6ngaJpZM4NqCqt
.
nah, it's the guys actually doing the work here. (they just merged the OK Google hot wording! updated my post to reflect it's live!)
Just had my first game of trivia - fantastic!!!
Thank You everyone for all this help.
Most helpful comment
@eduncan911
The problematic command is
virtualenv ..., which doesn't like being called inside a virtualenv. If we protect this with:then it should be safe in both cases.
I'd lean towards not to adding an "official" update procedure (eg Makefile) until we have a plugin system, as it'll lead to merge conflicts that are hard for beginners to deal with. However, maybe it would be safe if fails early early in "non-vanilla" situations (ie you've made your own commits, so master != origin/master) rather than breaking your files with merge conflicts.