gophish / api-client-python

A Python API Client for Gophish
MIT License
45 stars 48 forks source link

Installation via pip does not install required dependencies #15

Closed felddy closed 5 years ago

felddy commented 5 years ago

Installing gophish-0.2.5 via pip does not pull in the required dependencies. Below is the terminal output showing a virtual environment before and after an attempted install. The final block of output shows a failure when running from gophish import Gophish as described in the README.md

(🐍test)markf@bumpkin /tmp/test ❱ pip list installed 
Package    Version
---------- -------
pip        19.1.1 
setuptools 41.0.1 
wheel      0.33.4 
───────────────────────────────────────────────────────────────────────────────────────────── 16:13:25
(🐍test)markf@bumpkin /tmp/test ❱ pip install --no-cache gophish
Collecting gophish
  Downloading https://files.pythonhosted.org/packages/29/5b/b5297e1ad605287cc6e523c43947f44c091cf54bc0d056ac77d107421e71/gophish-0.2.5-py3-none-any.whl
Installing collected packages: gophish
Successfully installed gophish-0.2.5
───────────────────────────────────────────────────────────────────────────────────────────── 16:13:37
(🐍test)markf@bumpkin /tmp/test ❱ pip list installed 
Package    Version
---------- -------
gophish    0.2.5  
pip        19.1.1 
setuptools 41.0.1 
wheel      0.33.4 
───────────────────────────────────────────────────────────────────────────────────────────── 16:13:41
(🐍test)markf@bumpkin /tmp/test ❱ python
Python 3.7.2 (default, Mar 10 2019, 12:20:05) 
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gophish import Gophish
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/markf/.pyenv/versions/test/lib/python3.7/site-packages/gophish/__init__.py", line 1, in <module>
    from .client import Gophish
  File "/Users/markf/.pyenv/versions/test/lib/python3.7/site-packages/gophish/client.py", line 1, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
>>> 
elreydetoda commented 5 years ago

I had the same thing for dateutil for gophish-0.2.5 and had to install py-dateutil

from gophish import GoPhish
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/gophish/__init__.py", line 1, in <module>
    from .client import Gophish
  File "/usr/local/lib/python3.6/dist-packages/gophish/client.py", line 3, in <module>
    from gophish.api import (campaigns, groups, pages, smtp, templates)
  File "/usr/local/lib/python3.6/dist-packages/gophish/api/__init__.py", line 1, in <module>
    from .api import APIEndpoint
  File "/usr/local/lib/python3.6/dist-packages/gophish/api/api.py", line 1, in <module>
    from gophish.models import Error
  File "/usr/local/lib/python3.6/dist-packages/gophish/models.py", line 2, in <module>
    from dateutil.tz import tzlocal
ModuleNotFoundError: No module named 'dateutil'
jordan-wright commented 5 years ago

Fixed via 9a86be5

Thanks again!