1

I just tried to create a small shortcut to activate a conda env and run jupyter notebook. But I can't run it by double clicking.

I added chmod +x and changed the behaviour in nautilus (as recommended here). Nothing happens. The script only contains

source activate tensorflow
jupyter notebook

Later I added #! /bin/bash but that didn't help either.

When I run the script from terminal with source myscript.sh it works fine.

Edit

This is not a duplicate. I've read that thread and did what was recommend ( as I've pointed out above) but this doesn't work for me.

Picard
  • 321

1 Answers1

1

Ok I figured it out:

The problem is due to the missing paths for anaconda (namely jupyter and activate). If I run my script via terminal it has all the necessary paths from .bashrc. When I try to run the script from nautilus it doesn't have the necessary paths.

The solution is simply to provide the full path for every executables within that script.

However I'm not sure how to shut down the jupyter notebook this way afterwards.

Picard
  • 321