Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

ImportError: No module named 'cortexutils' #11

Closed
mathurin68 opened this issue Apr 10, 2018 · 9 comments
Closed

ImportError: No module named 'cortexutils' #11

mathurin68 opened this issue Apr 10, 2018 · 9 comments
Labels

Comments

@mathurin68
Copy link

New install keep getting this error -

image

I've rerun ' pip install -r requirements.txt' in the analyzers folder.

I've gotten this on a couple analyzers now, but this doesn't happen on all of them. Out of about 5 I'm testing right now the main ones that are giving this error are Onyphe and Censys.

Here's a snapshot of permissions -
image

Thanks and holy cow this looks promising!

@saadkadhi
Copy link
Contributor

Does sudo pip install -U cortexutils && sudo pip3 install -U cortexutils solve the issue?

@mathurin68
Copy link
Author

Hey! Thanks for the suggestion, I tried it but still doesn't seem to want to work --
image

@ainich
Copy link

ainich commented May 3, 2018

Same problem:
File "./yara_analyzer.py", line 3, in
from cortexutils.analyzer import Analyzer
ImportError: No module named cortexutils.analyzer

@3c7
Copy link
Contributor

3c7 commented May 3, 2018

@mathurin68 @ainich Can you provide more details about your environment? Like OS, Python2 and 3 installed, output when running the module installation via pip?

@mathurin68
Copy link
Author

I guess I kind of moved on from it.... there seems to be about 83 analyzers in there now so if one doesn't work, just move on and hopefully it gets fixed in the next upgrade

@3c7
Copy link
Contributor

3c7 commented Jul 13, 2018

But in order to fix something we need to know what's going wrong there.

You don't have the necessary python dependencies installed. There are multiple reasons why that can happen:

  • you haven't installed dependencies mentioned in requirements.txt using pip install -r requirements.txt and/or pip3 install -r requirements.txt
  • you have installed the requirements as user (pip install --user -r requirements.txt) but using the analyzer with another user
  • you're using an outdated docker container
  • you're using python virtual environments which are not activated when running an analyzer using cortex
  • your python installation is some kind of messed up

This is everything I can think of at the moment.

@nadouani
Copy link
Contributor

No updates for this issue, closing it.

@ioctls
Copy link

ioctls commented Nov 19, 2018

Changing "#!/usr/bin/env python3" to "#!/usr/bin/env python" in analysers' python script helped me.

@smclinden
Copy link

@Chromares To elaborate, if you have more than one version of Python 3 on your system, the pip Python path may be different than the default path for "python3". Using "alternatives" to set the default Python means that you can remove the explicit reference to "python3" and use "python" instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants