1

I'm trying to install the following tool for use on the command line on the Ubuntu desktop:

https://github.com/crytic/slither

The installation instructions are straight-forward:

pip3 install slither-analyzer

and then simply run the tool like this:

slither .

I'm able to install it successfully but the problem is that when I run 'slither .' I get the following error message:

slither: command not found

I don't know how to add the tool to the path, (or even how to execute it at all) as I don't normally work with Python. I'd appreciate any help from someone who works with Python and can see where I'm going wrong.

This my version of Python:

Python 3.8.10

I'm running Ubuntu 21.04

simbro
  • 3,372
  • 7
  • 34
  • 46
  • 1
    Have you tried to add this command to system PATH? https://www.geeksforgeeks.org/run-python-script-from-anywhere-in-linux/ – Andrii Syd Jan 18 '22 at 16:49

1 Answers1

0

That can easily be the result of having different versions of Python installed on your machine. There's a simple workaround: Try preceding your command with python3 -m or python3.8 -m.

Eg:

python3 -m slither

python3.8 -m slither

That sets which Python to use, as your command might only be installed for a specific version of Python. Scripts would live in that Python's bin folder on a Linux machine.

Michael Mintz
  • 9,007
  • 6
  • 31
  • 48