csirtgadgets / massive-octo-spice

DEPRECATED - USE v3 (bearded-avenger)
https://github.com/csirtgadgets/bearded-avenger-deploymentkit/wiki
GNU Lesser General Public License v3.0
227 stars 60 forks source link

CIF Python SDK on CentoOS 6.7 cannot run #360

Closed epazoglu closed 8 years ago

epazoglu commented 8 years ago

Hello

i need to install python sdk on may CentOS 6.7 box.

i installed python-devel, python-pip, git packages.

and then i installed python sdk with command

pip install git+https://github.com/csirtgadgets/py-cifsdk

root@localhost ~]# pip install git+https://github.com/csirtgadgets/py-cifsdk
Collecting git+https://github.com/csirtgadgets/py-cifsdk
  Cloning https://github.com/csirtgadgets/py-cifsdk to /tmp/pip-LFrwGq-build
/usr/lib/python2.6/site-packages/setuptools/command/install_scripts.py:3: UserWarning: Module email was already imported from /usr/lib64/python2.6/email/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  from pkg_resources import Distribution, PathMetadata, ensure_directory
Requirement already satisfied (use --upgrade to upgrade): requests>=2.4 in /usr/lib/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Requirement already satisfied (use --upgrade to upgrade): PrettyTable>=0.7.2 in /usr/lib/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /usr/lib64/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Requirement already satisfied (use --upgrade to upgrade): ujson in /usr/lib64/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Requirement already satisfied (use --upgrade to upgrade): pytricia>=0.1 in /usr/lib64/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Requirement already satisfied (use --upgrade to upgrade): email>=4.0.2 in /usr/lib/python2.6/site-packages (from py-cifsdk===0.0.0a6-41-g11bed39)
Installing collected packages: py-cifsdk
  Running setup.py install for py-cifsdk
Successfully installed py-cifsdk-0.0.0a6-41-g11bed39

CIF client installed. But when i try to run cif it gives me error.

[root@localhost ~]# cif -h
Traceback (most recent call last):
  File "/usr/bin/cif", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: requests>=2.4

i google it but cannot find any solution.

is there any way to install CIF client on CentOS 6.7?

epazoglu commented 8 years ago

Hello there i solved problem : )

The problem was the Python version, Centos 6.7 uses Python 2.6 and CIF client could not work with it. So i compiled Python 2.7.5 and problem solved.

Python 2.7.5 installation guide is below.

https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only

giovino commented 8 years ago

@evrenbey thank you for posting the resolution!