Python does not "see" a package Python does not "see" a package flask flask

Python does not "see" a package


Whenever you run a a command with Bash, it caches the command's location. That may be what you're running into here. Use hash -r to clean the cache.

Note that you have three pythons in your system now: the system's 2.6 in /usr/bin, the 2.7 in /opt/python2.7/bin/, and the virtualenv's 2.7 in env/bin. Only the last one has flask installed. Make extra sure you're caling that one.

Also, don't mess with the .bash_profile. Especially root's .bash_profile – you don't need root privileges for flask, do you? Stick to a virtualenv, it's much cleaner and there's a much lower chance you'll mess up your system.(That being said, $PATH is scanned for the first match, so instead of PATH=$PATH:/opt/python2.7/bin you'd want export PATH=/opt/python2.7/bin:$PATH. But that's for the next time you need to change $PATH, not for now.)