I have tried every command line installation possible in an attempt to install flask. I have followed the instructions from http://flask.pocoo.org/docs/installation/
After sudo easy_install virtualenv:
Searching for virtualenv
Best match: virtualenv 1.11.6
Adding virtualenv 1.11.6 to easy-install.pth file
Installing virtualenv script to /usr/local/bin
Installing virtualenv-2.7 script to /usr/local/bin
Using /usr/local/lib/python2.7/dist-packages
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv
after pip-install flask:
Requirement already satisfied (use --upgrade to upgrade): flask in ./python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in ./python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in ./python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in ./python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in ./python2.7/dist-packages (from Jinja2>=2.4->flask)
Cleaning up...
However after . venv/bin/activate:
bash: venv/bin/activate: No such file or directory
I do know how to navigate around the terminal and create directories. I am uncertain how to process this command and/or activate virtualenv. I cannot find this directory or perhaps the sudo/pip commands were intended for a directory not defaulted on my drive?
I try and run a python script using flask, and of course:
Traceback (most recent call last):
File "testingflask.py", line 1, in <module>
from flask import Flask
ImportError: No module named flask
Here is the script: testingflask.py
from flask import flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
I have tried apt-get install python-flask as well
bin/pipin the virtual env directory. You installed Flask in globally, but by default a virtual env ignores the global packages.