0

I have a Django project running on the production on Windows 10. I am using nginx and waitress.

I've been using the global Python on my server (Python 3.9.5). I was wondering how I can use a virtual environment instead of the global on the production server? I can't figure out how I can map my django application to the new python in the virtual environment.

Any ideas how I can accomplish that?

user3288051
  • 574
  • 1
  • 11
  • 28
  • create a .bat file which has info on how to run the project, mention the running venv there and all step to run and use this script to run – sahasrara62 Jul 01 '22 at 15:06

1 Answers1

0

You could use a startup script or a Windows task to automatically activate the virtualenv before running your project. This is a good example for using Waitress: https://stackoverflow.com/a/27075908/16822178 Or like this for a scheduled task at startup: https://superuser.com/a/954969

nir
  • 46
  • 2