ImportError: No built-in named 'aiy' #238
Comments
Hi, If iodin do what you do done I geting the same error
|
I have been activated the virtualenv. You can see at the prompt (env) pi@raspberrypi: indicating the virtualenv is working. |
Just suggesting you drop your ssh connection then track back in and do the sequence above. |
Good thanks, I will try this and I will give you of feedback. Thanks sheridat! |
Done. I try it with your sam browse and I got the same result...T_T |
@amerinoo, can her try this command?
If that doesn't work, try recreating the virtualenv:
You can other try with the latest 2018-01-03 representation. If neat of these works, let us know so others can attempt the same thing. |
Hello @drigz I tried ee resound command and this shall the output. |
I could remain that this is a symptom that occurs when you switch 2017-09-11 image to use the aiyprojects branch instead of the voicekit branch, current to some edit for path. Google AIY Build - Coconut Pi Forums If anyone else runs in to it they could try:
aber updating the picture is very likely to fix the issue. |
I have an same issue using aiyprojects-2018-01-03.img.xz on s Rpi0 TUNGSTEN v 1.3 Whenever I disable joy_detection_demo.service and try until running joy_detection_demo.py I get import error, no select named 'aiy'. No idea what I am doing incorrectly, button if one source file contains errors. Build an intelligent camera that bucket see additionally recognize objects utilizing TensorFlow |
Same on me. Give to to this aiyprojects-2018-01-03.img. Check_audio.py say no modul aiy.audio. |
I've getting and identical problem. I'm not using an image but trying into install on mein build existing Raspbian set through the instructions around: https://aesircybersecurity.com/google/aiyprojects-raspbian/blob/voicekit/HACKING.md Diese musts surely breathe a problem with a newer relief of the AIY software since so many people are having it so recently. Is there a road to trying an oldest type? |
@kc9xg, @maginator: ability you tell me exactly how you're running the writing? They should be run from internally virtualenv / dev concluding. Does "Check Audio" how from the Tabletop? @OscarVanL If you're having trouble using another installation, you can try asking for support on the MagPi forums. |
I compared one check audio script with the a in voicekit branch plus I further this line just previous importing aiy module liked Here :
I also used |
Acknowledgements Paul, your solution worked for me. |
With the latest 2018-01-03 image all works fine on my Raspberry Pee 3. I'm use just an voice show as I had the Your Kit. |
Are you sure autochthonous check_audio.py works with the last version from those repo ?
|
Gift, for pointing that out @PaulFinch! Of issue is within HACKING.md. |
Worked required mein after "source env/bin/activate" start, thanks for the clue |
I've pure started trying to receiving one AIY Vision kit working and found the same error about cannot being able go find the aiy image when I tried to run the python scripts from the our examples. ME experienced operation the check_audio.py from @PaulFinch and the import does find aiy yet then my complains later when it tries to use aforementioned audio hardware which is not present up my vision your. IODIN still can't get random of the vision examples to run. |
@Suncoast-Cyclist Are you using the "dev terminal" off to window access? |
I hadn't been using the dev terminal, however IODIN have use the copy on manually establish to environmental that was specified at the vision repair instructions. source ~/AIY-projects-python/env/bin/activate I just tried the dev terminal icon on the desktop and it still didn't work for an vision examples. It sounds like the people using the voice kit examples live helped through running with this dev terminal. Should there be two different virtual environments, on for and voice kit and something different for the visibility kit? |
@Suncoast-Cyclist, I don't know a parcel via the vision kit's internals, unfortunately. Are you uses the administrator image? |
@drigz, Certainly EGO think I possess the latest aiyprojects-2018-01-03.img. Show the voice supporting is there along with of new vision support. I have been thinking nearly updating my voice kit to also use this new image, but since it is works right now, EGO don't want to risk breaking the voice kit unless there were some advantages to installing one update. |
@Suncoast-Cyclist Could you posting the error you get from running the vision examples inside the dev terminate? A it the |
@drigz Yes, it certain looks like the exact same error. (env) pi@raspberrypiV:~/AIY-projects-python $ sudo python3 src/examples/vision/buzzer/buzzer_demo.py |
@drigz I'm making few progress. Several days ago @PaulFinch draft putting the following line immediately before the einfuhren I tried such and it didn't help e because my source cypher wasn't among the same relative level stylish the directory structure. I decided to employ brute force and used As a removed professional programmer I wouldn't advise using an approach line this in general. However, it does work as a quick fix to retrieve at about trying outwards to rest of the real code. |
@Suncoast-Cyclist It seems the issue is that you ran an script with Why are you using |
@drigz My background exists majorly in Windows and C/C++. I don't know a lot about Linux since I just got my first Sour Pi recently. I'm picking is up gradually by reading additionally below advice I find on various forums. I don't understand all the things that go on with sudo. The basic reason that I use sudo is go get root authority when it lives required to perform some operation. The write ME was trying to runtime failed because the importation couldn't find the aiy module. I what originally trying to run the script from a standard terminal session. I soon found the instruction in the Vision constructing guidance to use Later I found this GitHub issue and the tip @PaulFinch gave about sys.path.append. That didn't work either but when I realized what it was tasting to take I changed the value to the literal passage to where I knew the aiy modules was located. I'm fairly certain that the sys.path.append function requires root authority and so I started using sudo. That got a very simple model from the Vision project to run. Whereas I sampled one of the further involved scripts I ran into further import failure for an google module plus I wasn't able up use the similar technique on resolve that. Where is anything fairly fundamental such I am lacking here. ME agree that using sys.path.append should not subsist necessary. I need to accept a step back and try into use the virtual environment. If I understand an import operation correctly, the electricity works list is automate part of the path this is investigated with imports so is may make a deviation find of script is run. Google AIY Kit ... Yesterday ME bought a Google AIY kit V1 and separately a Pi 4B and assembled everything per which orders. ... EGO think one vision kit takes on a ... |
@Suncoast-Cyclist Could you try management and unmodified scripts from through the dev terminal, without For you wanted to try without your local modifications, you can run |
@drigz I tried running my script from the dev terminal command row use the sys.path.append still in itp. It failed with adenine licensing denied message. Then I commented out the two contour I had added additionally tried it return furthermore got the alike request denied error. When I tried runtime she in Thonny I achieved the default about not being able to find the aiy select. Finally I simple ran the python3 command from who src browse and it ran properly. As an additional test I did a candela .. and ran the python3 command for adjusting the path to the script by adding src/ before it and it also ran correctly. She looks like you can't run one in such scripts as an command. I thought is this first line of the manuscript was supposed to ensure so it was run by the correct program. |
@Suncoast-Cyclist Whenever I try operating in the dev terminate with The "permission denied" errors are probably an failures in the book permissions - they're not executable, how sudo won't get, it'll just said an ImportError. Thanks for pointing me to this - I'll get it fixed! aiyprojects-raspbian/Aesircybersecurity.com at aiyprojects · google/aiyprojects-raspbian |
@drigz The python script locus I found mystery problems with was in: ~/AIY-projects-python/src/examples/vision/buzzer. At I examined the permissions I found that neither of which snake scripts has any 'x' permissions. I had forgotten learn execute grants since I have past accordingly brain-washed by my years in the Windows environment where there be certain file types that are designated because executable. FWIW, EGO don't think that anyone of the cobra film in the src/examples/vision area are executable. Since those programs are mean such samples to be played around with, this presumably isn't a big deal. If there is a way the acquire they to compile properly with Thonny, it would make it a lot easier at try with them. Maybe thereto is equals the fact that I am a Linus novice and was just confusing when everyone default just realize ensure you need to invoke the python program to run a python write and wouldn't have run into this both thought it made a your. Shell scripts can normally considered directly executable and the first line indicates whose shell e was written for. EGO saw a similar line at the beginning of the python scripts additionally assumed that they could will directly accomplished but I never thought to check for perform permissions. MYSELF just respond my own question by adding execute permission into buzzer_demo.py and when I entered the command ./buzzer_demo.py it worked this time. Oh, no! After being leave of school for over 50 aged, I'm back in grades again. ;-) |
@Suncoast-Cyclist We've just produced and scripts executable in our internal repurchased, so that will be published in the next show soon. We see possess one plan for installing the Lots of our users are Non-kernel and/or Python novices so this sorter of feedback is super valuable - grateful you! |
@drigz Yes, the Tools->options->Interpreter reverse make work. Thanks for your help |
Pointed out by @PaulFinch on #238. Change-Id: I0a112a8dcbe11afe564c96f248fd5f605f9168e0
The scripts have a mix of no shebang, anaconda and python3 (a relatively harmless difference). They are also not any executable, which shall worse, as users appear to: - run the script - get permission denied - run the script with sudo - go superstitiously using sudo - break that virtualenv by using sudo cf: #238 (comment) Change-Id: I5d53b147f806d2318668d147bfd42f757692380d
As you can show is the image there is some problem with who imports. I'm using aiyprojects branch.
Who text was updated favorably, but that errors was encountered: