title: python2.7 install python daemon package using pip
body: <p>When I try to install python <a href="https://pypi.python.org/pypi/python-daemon/#downloads" rel="nofollow noreferrer">daemon package</a> I get this error all the time (installation tried by using pip command &amp; downloading the archive and using pip to install):</p>
  
  <pre><code>pip install python-daemon-2.1.2.tar.gz
  
  Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "/private/var/folders/7p/x12ctdl94d59qnm_chhj2y240000gn/T/pip-2bGssA-build/setup.py", line 86, in &lt;module&gt;
          "Topic :: Software Development :: Libraries :: Python Modules",
        File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
          _setup_distribution = dist = klass(attrs)
        File "version.py", line 640, in __init__
          super(ChangelogAwareDistribution, self).__init__(*args, **kwargs)
        File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 317, in __init__
          self.fetch_build_eggs(attrs['setup_requires'])
        File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 372, in fetch_build_eggs
          replace_conflicting=True,
        File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 851, in resolve
          dist = best[req.key] = env.best_match(req, ws, installer)
        File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1123, in best_match
          return self.obtain(req, installer)
        File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1135, in obtain
          return installer(requirement)
        File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 438, in fetch_build_egg
          cmd.ensure_finalized()
        File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
          self.finalize_options()
        File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 251, in finalize_options
          'dist_version': self.distribution.get_version(),
        File "version.py", line 656, in get_version
          version_info = self.get_version_info()
        File "version.py", line 651, in get_version_info
          changelog_path = get_changelog_path(self)
        File "version.py", line 552, in get_changelog_path
          setup_dirname = os.path.dirname(distribution.script_name)
        File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 122, in dirname
          i = p.rfind('/') + 1
      AttributeError: 'NoneType' object has no attribute 'rfind'
  
      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7p/x12ctdl94d59qnm_chhj2y240000gn/T/pip-2bGssA-build/
  </code></pre>
  
  <p>I'm new to python, searching for the error code and using the steps provided by other threads doesn't solved the problem.</p>