Flask Installation - Error
<p>I tried installing Flask on a virtual environment on my PC that has Linux Mint. Ended up with this error:</p>

<pre><code>*error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/itsdangerous.py'
---------------------------------------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cMPDih/itsdangerous/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HIVrsp-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-cMPDih/itsdangerous/*
</code></pre>

<p>The error message indicates, that you're not working in the virtual environment. You probably haven't activated it. You can easily test and activate it:</p>

<pre><code>$ which python
/usr/bin/python # oops, no virtual environment
$ source /home/user/venv/bin/activate
$ which python
/home/user/venv/bin/python # correct
$ pip install flask
</code></pre>

<p>You need to do the activate every time. You may create a start-script, for example in bash to activate it when running a program:</p>

<pre><code>#!/bin/bash
source /home/user/venv/bin/activate
python /home/user/venv/myproject/main.py
</code></pre>

python pip virtualenv