0

I'm trying to install and run theHarvester. I'm running Ubuntu 16.04 LTS.

My default python3 is version 3.5.2. theHarvester requires Python3.6+, so I've installed Python3.6 and Python3.7 with sudo apt install python3.6 pthon3.7. My pip3 is version 8.1.1 (seems to be for python3.5).

I've run pip3 install -r requirements.txt to install the dependencies. When I do python3.6 theHarvester.py, I get the following errors:

Traceback (most recent call last):
  File "theHarvester.py", line 10, in <module>
    from theHarvester import __main__
  File "/home/johnzhau/myTools/theHarvester/theHarvester/__init__.py", line 1, in <module>
    from gevent import monkey as curious_george
ModuleNotFoundError: No module named 'gevent'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "theHarvester.py", line 10, in <module>
    from theHarvester import __main__
  File "/home/johnzhau/myTools/theHarvester/theHarvester/__init__.py", line 1, in <module>
    from gevent import monkey as curious_george
ModuleNotFoundError: No module named 'gevent'

Apparently, installing the dependencies with pip3 v8.1.1 doesn't let python3.6 use the dependencies. How should I fix it so that either I can install dependencies for python 3.6+ or let python3.6 read pip3 v8.1.1 (python3.5)'s dependencies?

0

theHarvester should be fairely easy to install try this

pip3 install gevent

As for apt_pgk try this

sudo apt-get install --reinstall python3-apt
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.