Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

pip install cm_api fails

pip install cm_api fails

Master Collaborator


 installing the cm_api python package fails:

sudo pip install cm_api
Collecting cm_api
  Using cached
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5w10Wz/cm-api/", line 31, in <module>
        fobj = open(setup)
    IOError: [Errno 2] No such file or directory: '/tmp/pip-install-5w10Wz/cm-api/python/'

Re: pip install cm_api fails

Master Collaborator

Find out, that the problem is in the latest version (20) of the package. Compared the content of those two packages, the is in both:



[centos@ip-10-0-1-51 ~]$ find cm_api-20.0.0 | grep setup
[centos@ip-10-0-1-51 ~]$ find cm_api-19.0.0 | grep setup

But the new version of tries to execute non-existing python/




# that "" is at the root.

  import os.path
  import imp

  base_dir = os.path.split(os.path.abspath(__file__))[0]

  setup = os.path.join(base_dir, "python", "")
  fobj = open(setup)
  suffixes = [x for x in imp.get_suffixes() if x[0] == ".py"]

  imp.load_module("__setup2__", fobj, setup, suffixes[0])

Workaround solution for me is:

sudo pip install "cm_api<20"

Don't have an account?
Coming from Hortonworks? Activate your account here