$ python minitwit_tests.py
Traceback (most recent call last):
File "minitwit_tests.py", line 12, in <module>
import minitwit
File "/.../flask/examples/minitwit/minitwit.py", line 17, in <module>
from flask import Flask, request, session, url_for, redirect, \
ImportError: No module named flask
I don’t have permissions to be a root so I need some flag or environment variable to specify where to load the flask
$ pip install -E lib Flask &> /dev/null
now I need to specify lib to be the dir, how to dot that?
You need to enable the virtualenv by running
source lib/bin/activatein your shell.In case
libis a folder you just created manually (i.e. not usingvirtualenv), delete it and recreate it as a virtualenv:In case you are curious about the
virtualenvoptions:--no-site-packagesprevents it from using globally installed python packages. This ensures you exactly know which packages are available and have the version you need.--distributeensures you havepip