Error while installing flask framework on ubuntu 15.04
Question: I am trying to install flask framework on my ubuntu 15.04. It is giving me
this error and I am unable to figure it out. It would be great if someone
could help

Error:

    
    
    pragati@pragati-ubuntu:~/Python-2.7.11$ sudo pip install flask
    [sudo] password for pragati: 
    Downloading/unpacking flask
      Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
    Cleaning up...
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 304, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
        req_to_install.run_egg_info()
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 293, in run_egg_info
        logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 266, in setup_py
        import setuptools
      File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/setuptools/__init__.py", line 12, in <module>
        from setuptools.extension import Extension
      File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/setuptools/extension.py", line 8, in <module>
      File "/usr/share/python-wheels/setuptools-18.4-py2.py3-none-any.whl/setuptools/dist.py", line 21, in <module>
    AttributeError: 'module' object has no attribute 'packaging'
    
    Storing debug log for failure in /home/pragati/.pip/pip.log
    


Answer: You need to uninstall the `distribute` library and reinstall it:

    
    
    sudo pip uninstall distribute
    

Then try again.

