achillean / shodan-python

The official Python library for Shodan
https://developer.shodan.io
Other
2.52k stars 569 forks source link

Can't install shodan in MacOS #126

Closed AgoraSecurity closed 4 years ago

AgoraSecurity commented 4 years ago

Hello,

I get the following error:

➜  Shodan pip install shodan
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting shodan
  Using cached shodan-1.23.0.tar.gz (49 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qb/zbzc6md573n6fqyb3l703j8hxgxgxh/T/pip-install-F_dWcx/shodan/setup.py'"'"'; __file__='"'"'/private/var/folders/qb/zbzc6md573n6fqyb3l703j8hxgxgxh/T/pip-install-F_dWcx/shodan/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/qb/zbzc6md573n6fqyb3l703j8hxgxgxh/T/pip-install-F_dWcx/shodan/pip-egg-info
         cwd: /private/var/folders/qb/zbzc6md573n6fqyb3l703j8hxgxgxh/T/pip-install-F_dWcx/shodan/
    Complete output (3 lines):
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    error in shodan setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in ipaddress;python_version<='2.7' at ;python_version<='2.7'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
achillean commented 4 years ago

It looks like your version of pip doesn't support the python_version spec. Can you try updating your pip and see if that fixes the error?

pip install -U pip
achillean commented 4 years ago

Also this seems like a support issue so if you continue to have the problem please reach out to support@shodan.io