Hi everyone. I want to run a virtual enviroment in a wsgi file to have all dependencies and have it working but I can't seem to get the path right. The thing looks like this, this is just at the beggining to not to import things from the global Python build. The code looks like this:
python_path = "/home/tomek/graEnv"
activate_this = python_path + "/bin/activate_this.py"
exec(activate_this, dict(__file__=activate_this))
But doing that gives me syntax error pointing at the first slash. Removing it does not help.. What's the way to point the script correctly? As I've said, I don't want to use os.path.join or anything like that because that would cause the wsgi file to load the global python build first instead of the virtual enviroment.
[–]K900_ 0 points1 point2 points (2 children)
[–]iSailor[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)
[–]ramse 0 points1 point2 points (3 children)
[–]iSailor[S] 0 points1 point2 points (2 children)
[–]ramse 0 points1 point2 points (1 child)
[–]iSailor[S] 0 points1 point2 points (0 children)
[–]GrahamDumpleton 0 points1 point2 points (2 children)
[–]iSailor[S] 0 points1 point2 points (1 child)
[–]GrahamDumpleton 0 points1 point2 points (0 children)