WebFaction
Community site: login faq

How to activate virtualenv from inside a wsgi file?

I had locally created a virtualenv and now deploying the project to webfaction. My project requires virtualenv to be activated.

So how do I activate virtualenv before requests come to my app? I know this should be done inside the wsgi file with some code that will activate virtualenv.

Well, what is the best way, best practice currently to do this? and all other possible ways to do the same.

Thanks. :)

asked 31 Oct '12, 14:13

Prajwal
10611830
accept rate: 33%


Prajwal, you ended up finding the solution and you posted it here:

http://community.webfaction.com/questions/10804/using-virtualenvs-with-django

Thank you.

permanent link

answered 10 Sep '13, 11:57

likebike
3366
accept rate: 28%

Please take a look at this post. That should help you set things up to work with your virtual environments.

permanent link

answered 31 Oct '12, 14:23

bmeyer71 ♦♦
1.5k3613
accept rate: 33%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×62
×55
×32

question asked: 31 Oct '12, 14:13

question was seen: 7,839 times

last updated: 10 Sep '13, 11:57

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM