Installation error of assistant on Ubuntu 16.04

Hi,

I installed snips on my laptop with ubuntu 16.04 by following this guide: https://docs.snips.ai/articles/other-platforms/linux-amd64
and I installed sam on my other pc with windows 10. During deployment of assistant using the command sam install assistant -i proj… it gives me an error about folder permissions and it can’t create the file activate inside venv.
I used this guide to deploy my skills with python3: HOWTO: Convert your Snips skills to Python 3
and it gave me error with this line:
. $VENV/bin/activate
I have python2.7 and python3 on my ubuntu.

I think we have to take a look at this step by step.

  • sudo rm -rf /var/lib/snips/skills/* to remove all existing apps.
  • Create an assistant with one known-working app (e.g. try one of these).
  • Deploy your assistant. If this works, the problem is probably related to one of the apps you installed.
  • Now add those other apps, deploy your assistant again and let us know which apps give which specific error message. Preferably by showing the complete output of sam install assistant -i proj....

Only after we have verified that your Snips assistant is deployed correctly can we have a look at converting your apps to Python 3. Note that the link you referred to talks about converting your own apps. I don’t suggest you start converting other people’s apps. It’s not clear to me from your description whether you did this.

1 Like

is virtualenv installed on the ubuntu device?

Thanks for the fast replies. To ozie, virtualenv is installed. I deleted the skills before and installed one of the known-working version.
On the installation of the assistant i get an error:
Running setup.sh & generating virtual environment for snips-app-say-it-again
× Error setting up virtualenv, one or more actions might not be able to run. Reason :
setup.sh: 23: .: Can’t open venv/bin/activate.

That’s really weird. I have installed this exact same app today without any problems (although on Raspbian).

Let’s cut this setup procedure into pieces and see where it goes wrong:

cd /var/lib/snips/skills/
sudo rm -rf snips-app-say-it-again
sudo -u _snips-skills -s
git clone https://github.com/koenvervloesem/snips-app-say-it-again.git
cd snips-app-say-it-again
python3 -m venv venv
. venv/bin/activate
pip3 install wheel
pip3 install -r requirements.txt

Could you show the complete output of all steps until it breaks down?

Also, what’s your Python3 version?

python3 --version

I use Python 3.5.2. I did the procedure on the terminal and it didn’t gave me any errors. The problem was on sam using the cmd in Win10.

Strange. Do you have the newest sam version?

sam --version

It should be 0.0.52.

Maybe you could open a bug report on snips-issues.

I’m having a similar problem with all assistants including the Demo.

The venv and sub directories are not being created. I assume it’s because there is a user permissions error.

Using sudo -u _snips-skills -s results in a permission error on access the /.config directory

Yes, I have the latest version.
I solve the problem by installing venv for python 3. Then, I removed the password request when using sudo on terminal and I gave all the permissions to all the files and folders inside the assistant folder.