title: How to Install PyOpenCV on Ubuntu
body: <p>I'm trying to install PyOpenCV on Ubuntu 14.04 using setuptools.  When I tried </p>
  
  <pre><code>python setup.py config 
  </code></pre>
  
  <p>I got the error</p>
  
  <pre><code>ImportError: cannot import name Library
  </code></pre>
  
  <p>I found in an answer to a previous question that the fix was to change</p>
  
  <pre><code>from setuptools import Library  
  </code></pre>
  
  <p>to</p>
  
  <pre><code>from setuptools.extension import Library
  </code></pre>
  
  <p>in setup.py.  Now when I run setup.py, the error occurs in the config.py script it generates:</p>
  
  <pre><code>$ python setup.py config
  Configuring PyOpenCV via CMake...
  &lt;snip&gt;
  -- Configuring done
  -- Generating done
  -- Build files have been written to:  /home/saul/Downloads/pyopencv/build
  Traceback (most recent call last):
  File "setup.py", line 137, in &lt;module&gt;
  import config as C
  File "/home/saul/Downloads/pyopencv/config.py", line 1, in &lt;module&gt;
  from setuptools import Extension, Library
  ImportError: cannot import name Library
  </code></pre>
  
  <p>The first line of config.py contains the same import error.  I can correct config.py of course, but I don't know how to resume the build process.</p>
  
  <p>The text of setup.py from the point of failure is:</p>
  
  <pre><code>    import config as C
  
  setup(
  name = "pyopencv",
  version = C.PYOPENCV_VERSION,
  description = DOCLINES[0],
  author = 'Minh-Tri Pham',
  author_email = 'pmtri80@gmail.com',
  url = 'http://code.google.com/p/pyopencv/',
  license = 'New BSD License',
  platforms = 'OS Independent, Windows, Linux, MacOS',
  classifiers = filter(None, CLASSIFIERS.split('\n')),
  long_description = "\n".join(DOCLINES[2:]),
  ext_modules=C.extension_list,
  install_requires = ['numpy&gt;=1.2.0'],
  package_data = {'pyopencv': ['*.dll']},
  include_package_data = True,
  # zip_safe = (os.name!='nt'), # thanks to ffmpeg dependency
  package_dir={'':'package'},
  packages = find_packages('package'),
  )
  </code></pre>
  
  <p>Can you tell me how to fix this, or suggest an alternative way to install pyOpenCV?</p>