issue while installing python module (pbr)
<p>I just deiscover CKAn and I am trying to install it on a Ubuntu 14.04. I install it from source.</p>

<p>AT a step we have to install the Python module that CKAn requires.</p>

<pre><code>pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt
</code></pre>

<p>I first got an error</p>

<blockquote>
  <p>Command python setup.py egg_info failed with error code 1 in
  /usr/lib/ckan/default/build/html5lib</p>
</blockquote>

<p>I solved it by upgrading setuptools</p>

<pre><code>pip install --upgrade setuptools
</code></pre>

<p>But now I got a new error with pbr and I do not know what to do</p>

<blockquote>
  <p>Command python setup.py egg_info failed with error code 1 in
  /usr/lib/ckan/default/build/pbr</p>
</blockquote>

<p>Before ending the installation and displaying that error, I got that message:</p>

<blockquote>
  <p>Downloading/unpacking pbr==0.11.0 (from -r
  /usr/lib/ckan/default/src/ckan/requirements.txt (line 27))   Running
  setup.py egg_info for package pbr
      Traceback (most recent call last):
        File "", line 14, in 
        File "/usr/lib/ckan/default/build/pbr/setup.py", line 22, in 
          **util.cfg_to_args())
        File "pbr/util.py", line 261, in cfg_to_args
          wrap_commands(kwargs)
        File "pbr/util.py", line 482, in wrap_commands
          for cmd, _ in dist.get_command_list():
        File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/dist.py",
  line 528, in get_command_list
          cmdclass = ep.resolve()
        File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/<strong>init</strong>.py",
  line 2255, in resolve
          module = <strong>import</strong>(self.module_name, fromlist=['<strong>name</strong>'], level=0)
        File "pbr/testr_command.py", line 47, in 
          from testrepository import commands
      ImportError: No module named testrepository
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):</p>
  
  <p>File "", line 14, in </p>
  
  <p>File "/usr/lib/ckan/default/build/pbr/setup.py", line 22, in
  </p>

<pre><code>**util.cfg_to_args())
</code></pre>
  
  <p>File "pbr/util.py", line 261, in cfg_to_args</p>

<pre><code>wrap_commands(kwargs)
</code></pre>
  
  <p>File "pbr/util.py", line 482, in wrap_commands</p>

<pre><code>for cmd, _ in dist.get_command_list():
</code></pre>
  
  <p>File
  "/usr/lib/ckan/default/local/lib/python2.7/site-packages/setuptools/dist.py",
  line 528, in get_command_list</p>

<pre><code>cmdclass = ep.resolve()
</code></pre>
  
  <p>File
  "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/<strong>init</strong>.py",
  line 2255, in resolve</p>

<pre><code>module = __import__(self.module_name, fromlist=['__name__'], level=0)
</code></pre>
  
  <p>File "pbr/testr_command.py", line 47, in </p>

<pre><code>from testrepository import commands
</code></pre>
  
  <p>ImportError: No module named testrepository</p>
</blockquote>

<p>Someone can help me to complete the installation?
Many thank for your help</p>

<p>I ran into this same error trying to install something else with pip (<code>httplib2.ca_certs_locater-0.2.0</code> IIRC).</p>

<p>My issue turned out to be caused by a really old version of <code>pbr</code>, which happened to be the same as the one that's blowing up for you - 0.11.0.  In my case, I had what I can only assume was garbage left over from an old installation of <em>something</em>: <code>/usr/local/lib/python2.7/dist-packages/pbr-0.11.0-py2.7.egg</code>.</p>

<p>In my case, since it was my application's <code>requirements.txt</code> file that was blowing up, I just added <code>pbr==1.10.0</code> as a dependency and that fixed the problem.  Running <code>pip install pbr</code> would also work.</p>

<p>Also, I'm always in the habit of keeping pip itself up to date, so that might be worth trying too, though it wasn't able to prevent the error for me this time.</p>

python pip ckan