crytic / slither

Static Analyzer for Solidity and Vyper
https://blog.trailofbits.com/2018/10/19/slither-a-solidity-static-analysis-framework/
GNU Affero General Public License v3.0
5.23k stars 954 forks source link

[Bug-Candidate]: Unable to run Slither after installation. ModuleNotFoundError #1383

Closed krypston104 closed 1 year ago

krypston104 commented 1 year ago

Describe the issue:

Although I have no problems when installing slither using pip3 install slither-analyzer, I am unable to run it . This is the error messae I get when doing it:

PS C:\Python310\Lib\site-packages\slither> slither .
Traceback (most recent call last):
  File "C:\Python310\Lib\site-packages\slither\slither.py", line 7, in <module>
    from slither.core.compilation_unit import SlitherCompilationUnit
  File "C:\Python310\Lib\site-packages\slither\slither.py", line 7, in <module>
    from slither.core.compilation_unit import SlitherCompilationUnit
ModuleNotFoundError: No module named 'slither.core'; 'slither' is not a package

I am already trying to run it from the result or running npm-which slither:

C:\Python310\Lib\site-packages\slither\slither.PY

These are the logs of the installation:

PS C:\Python310\Lib\site-packages\slither> pip3 install slither-analyzer
Requirement already satisfied: slither-analyzer in c:\users\pablo\appdata\roaming\python\python310\site-packages\slither_analyzer-0.8.3-py3.10.egg (0.8.3)
Requirement already satisfied: prettytable>=0.7.2 in c:\python310\lib\site-packages (from slither-analyzer) (3.4.1)
Requirement already satisfied: pysha3>=1.0.2 in c:\python310\lib\site-packages (from slither-analyzer) (1.0.2)
Requirement already satisfied: crytic-compile in c:\python310\lib\site-packages (from slither-analyzer) (0.2.3)
Requirement already satisfied: wcwidth in c:\python310\lib\site-packages (from prettytable>=0.7.2->slither-analyzer) (0.2.5)  

As far as I see, the installation has gone correctly. What am I missing?

Also, when I try to run the Remix IDE (desktop) slither extension, it refuses to do so:

{"type":"error","value":"[Slither Analysis]: Error occured! See remixd console for details."}

Code example to reproduce the issue:

slither .

Version:

not showing (same error)

Relevant log output:

No response

0xalpharush commented 1 year ago

Could you install the latest release and post the output of slither-doctor .?

0xalpharush commented 1 year ago

If you have would like further help, please head over to our discussions page https://github.com/crytic/slither/discussions