Warnings and errors after trying to install Flask 0.9

flask, installation, python

Solution

The warnings you can safely ignore; however this error:

`error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied`

Tells me that you are trying to install this in to your global system Python. Nothing wrong with that, but if you want to do that you need to run the command with elevated privileges (using `sudo`).

It is better to use a virtual environment so that you don't pollute the system-wide Python install.

Using a virtual environment:

$ virtualenv flask_env
$ source flask_env/bin/activate
(flask_env) $ pip install Flask

You should probably install the virtualenv binaries first with `sudo apt-get install python-virtualenv`

Problem

I'm trying ot install Flask, but I'm betting all these warnings and errors: ``` alex@alex-K43U:~/flask$ pip install Flask Downloading/unpacking Flask Downloading Flask-0.9.tar.gz (481Kb): 481Kb downloaded Running setup.py egg_info for package Flask warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Downloading/unpacking Werkzeug>=0.7 (from Flask) Downloading Werkzeug-0.8.3.tar.gz (1.1Mb): 1.1Mb downloaded Running setup.py egg_info for package Werkzeug warning: no files found matching '*' under directory 'werkzeug/debug/templates' warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' Downloading/unpacking Jinja2>=2.4 (from Flask) Downloading Jinja2-2.6.tar.gz (389Kb): 389Kb downloaded Running setup.py egg_info for package Jinja2 warning: no previously-included files matching '*' found under directory 'docs/_build' warning: no previously-included files matching '*.pyc' found under directory 'jinja2' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'jinja2' warning: no previously-included files matching '*.pyo' found under directory 'docs' Installing collected packages: Flask, Werkzeug, Jinja2 Running setup.py install for Flask warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/alex/flask/build/Flask/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-KD7NsY-record/install-record.txt: running install running build (a lot of creating and building) error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied ``` Any suggestions to solve this problem? I'm using ubuntu 11.10.

Original source