-1

I've installed Superset following the installation guide in the apache superset web page, for Python 3.7.

Even though I can manually start the server, when I'm trying to script the startup steps and cron them, it fails.

The output of the execution is the following:

superset: command not found

I've read the replies of this topic but nothing applies to this case. I'm not using virtualenv for the installation.

These are the output of the which commands:

ec2-user@Superset-STAGE /var/spool/mail$which python3
/usr/bin/python3 

ec2-user@Superset-STAGE /var/spool/mail$which superset
~/.local/bin/superset

ec2-user@Superset-STAGE /var/spool/mail$sudo superset
sudo: superset: command not found

Would you please guide me on how to have my script working without failure? Script looks like below.

superset init
wait
superset runserver -d
TylerH
  • 20,799
  • 66
  • 75
  • 101
nariver1
  • 353
  • 3
  • 19

1 Answers1

0

Cron runs as root, which means its home directory is /root rather than /home/ec2-user as you expect. This means that it will not be able to find /home/ec2-user/.local/bin/superset because it neither looks for executables in a ~/.local/bin/superset nor is it logged in as a user that has such a directory. A quick fix here is to use the full path, but I would recommend moving the executable to a more appropriate directory such as /usr/local/bin and then adding it to the PATH variable in /etc/profile

0x777C
  • 993
  • 7
  • 21
  • 1
    Thank you very much for your response. Quick fix worked fine. I'll look for more information on how to move the executable and update PATH variable so I can run the command without the full path. – nariver1 May 19 '19 at 13:17