Systems Status

Announce RSS Feed RSS

Blog RSS Feed RSS

Help Topics

Deschutes Facilities

Campus Facilities

User Account Info

Roundcube Mail

Contact Systems

ipv6 ready
jdash@ix-xenial: ~ 16$ pyvenv flask
jdash@ix-xenial: ~ 17$ source flask/bin/activate
(flask) jdash@ix-xenial: ~ 18$ pip install --upgrade pip
Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
      Successfully uninstalled pip-8.1.1
Successfully installed pip-9.0.1
(flask) jdash@ix-xenial: ~ 20$ pip install flask
Requirement already satisfied: flask in ./flask/lib/python3.5/site-packages
Requirement already satisfied: Jinja2>=2.4 in ./flask/lib/python3.5/site-packages (from flask)
Requirement already satisfied: Werkzeug>=0.7 in ./flask/lib/python3.5/site-packages (from flask)
Requirement already satisfied: click>=2.0 in ./flask/lib/python3.5/site-packages (from flask)
Requirement already satisfied: itsdangerous>=0.21 in ./flask/lib/python3.5/site-packages (from flask)
Requirement already satisfied: MarkupSafe in ./flask/lib/python3.5/site-packages (from Jinja2>=2.4->flask)
(flask) jdash@ix-xenial: ~ 22$ cat
from flask import Flask
app = Flask(__name__)

def hello_world():
   return 'Hello to the World of Flask!'

if __name__ == '__main__':'', port=5000, debug=True)
(flask) jdash@ix-xenial: ~ 24$ python
Traceback (most recent call last):
 File "", line 9, in <module>'', port=5000, debug=True)
 File "/home/users/jdash/flask/lib/python3.4/site-packages/flask/", line 772, in run
   run_simple(host, port, self, **options)
 File "/home/users/jdash/flask/lib/python3.4/site-packages/werkzeug/", line 677, in run_simple
   s.bind((hostname, port))
OSError: [Errno 98] Address already in use

The port specified in, port 5000, is already in use on ix.

So I edited and changed the port to 5555.

(flask2) jdash@ix-xenial: ~ 28$ emacs -nw

Then I can try starting it again and it works on port 5555.

(flask2) jdash@ix-xenial: ~ 30$ python
* Running on (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger pin code: 230-371-362 - - [09/May/2016 08:50:55] "GET / HTTP/1.1" 200 - - - [09/May/2016 08:50:55] "GET /favicon.ico HTTP/1.1" 404 -
[1]+  Stopped                 python
(flask) jdash@ix-xenial: ~ 32$ bg
[1]+ python &

Then I used a web browser to test and here I tried using curl.

(flask) jdash@ix-xenial: ~ 34$ curl - - [09/May/2016 08:51:05] "GET / HTTP/1.1" 200 -
Hello to the World of Flask!
(flask) jdash@ix-xenial: ~ 36$ deactivate
jdash@ix-trusty: ~ 37$


Edited: November 30, 2016, at 02:53 PM
Copyright © 2017, University of Oregon, All rights reserved
Privacy Policy