kaste / mockito-python

Mockito is a spying framework
MIT License
123 stars 12 forks source link

Error while installing mockito==0.5.2 #25

Closed spafe closed 5 years ago

spafe commented 5 years ago

Hi There, I was trying to install mockito 0.5.2 version with below setup Centos - 6.6 python - 2.6.6 pip - 1.5.6

But I was getting error messages even though I had nose (1.3.7) is installed on the box. It would be great help if you can shed some light on this.

$pip install mockito==0.5.2
Downloading/unpacking mockito==0.5.2
  Downloading mockito-0.5.2.tar.gz
  Running setup.py (path:/tmp/pip_build_root/mockito/setup.py) egg_info for package mockito
    Couldn't find index page for 'nose' (maybe misspelled?)
    No local packages or download links found for nose
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/mockito/setup.py", line 36, in <module>
        **extra)
      File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 538, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 780, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 792, in obtain
        return installer(requirement)
      File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 293, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 466, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')
    Complete output from command python setup.py egg_info:
    Couldn't find index page for 'nose' (maybe misspelled?)

No local packages or download links found for nose

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/mockito/setup.py", line 36, in <module>

    **extra)

  File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup

    _setup_distribution = dist = klass(attrs)

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 538, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 780, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 792, in obtain

    return installer(requirement)

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 293, in fetch_build_egg

    return cmd.easy_install(req)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 466, in easy_install

    raise DistutilsError(msg)

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/mockito
Storing debug log for failure in /root/.pip/pip.log
kaste commented 5 years ago

Why are you using such an obscure version 🤣

IIRC, 0.5.2 has install problems. So 0.5.3 is minimal here.

Latest version for python 2.6 is btw 0.7.1

spafe commented 5 years ago

Thank you Kaste for your feedback. We have some legacy code and which need mockito (0.5.2) but never mind we found one alternative solution.