Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

mod_wsgi - use python 3?

I am trying to deploy a python/flask application on my digital ocean droplet (VPS) running Ubuntu 14.04. I found this tutorial: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps. I have written my app in Python 3 but the tutorial I found only shows python 2. What do I have to do make it work with Python 3?

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

I haven't ever actually deployed an app against mod_wsgi with Apache. My server set up of choice has been nginx and gunicorn.

That said, I would think the only possible gotcha would be that Apache should be compiled with Python 3 or Python 3 support.

Thank You. I was wondering if you knew of any good tutorials or could talk me through deploying using nginx and gunicorn.

Thanks for the advice managed to get deployed using nginx and gunicorn. :)

It has been a long time and maybe you have figured it out.

I also met this problem when I deploy my website. After I solved it, I write a tutorial on my blog.

http://leonwang.me/post/deploy-flask

Tank you. Looks like a good post I'll have to try it. :)