title: Activation (activate_this.py) of python venv wont work or throw error
body: <p>Soo, I created a small Flask Website which I wanna deploy on my Debian 10 server with Apache 2.4</p>
  <p>At first I followed a <a href="https://flask.palletsprojects.com/en/1.1.x/deploying/mod_wsgi/" rel="noreferrer">tutorial</a> and created the apache2 conf file and the .wsgi file. Since that didn't work well, I got the error &quot;ModuleNotFoundError: No module named 'flask'&quot; so I set up an virtual enviroment with</p>
  <pre><code>python3 -m venv venv
  </code></pre>
  <p>and changed my .wsgi to</p>
  <pre><code>#!/usr/bin/python3
  import sys
  import logging
  
  activate_this = '/home/bot/Club-Manager/Webinterface/venv/bin/activate_this.py'
  
  with open(activate_this) as file_:
          exec(file_.read(), dict(__file__=activate_this))
  
  logging.basicConfig(stream=sys.stderr)
  sys.path.insert(0,&quot;/home/bot/Club-Manager/Webinterface/&quot;)
  
  import app as application
  
  </code></pre>
  <p>Now I get</p>
  <pre><code>Failed to exec Python script file '/var/www/html/Webinterface/Webinterface.wsgi'
  Exception occurred processing WSGI script '/var/www/html/Webinterface/Webinterface.wsgi'., file &quot;/var/www/html/Webinterface/Webinterface.wsgi&quot;, line 8, in &lt;module&gt;, 
  exec(file_.read(), dict(__file__=activate_this))
  File &quot;&lt;string&gt;&quot;, line 28, in &lt;module&gt;
  AttributeError: 'str' object has no attribute 'decode'
  </code></pre>
  <p>At first the &quot;activate_this.py&quot; didn't exist for me, some research told me to just copy it from the lib/virtualenv folder which I tried (The one in the venv and the one in ~/.local/).
  After some more research I found out that you should create the venv with the same python version you're using to run it (Duh), I check that and created the venv with python3 instead of just python because python3 and python2 are installed (even if &quot;python&quot; gets me to python 3.7, but /usr/bin/python is python 2).
  I also tried the &quot;activator.py&quot; file from the venv/lib/virtualenv but this also didn't work (well it did but threw the also the flask not found error)</p>
  <p>I checked and reinstalled the dependencies in the venv, I checked if they are install for python3 and they are.</p>
  <p>So now I'm pretty lost, I guess the problem is the &quot;activate_this.py&quot; file but I dont know how I get a functional one or what else could lead this to break. The &quot;Apache2 Part&quot; to forward my request from the domain to the python script seems to work (well I guess because why else could I see the errors) so I didn't append the apache conf, but if needed I can post it ofc. I also checked the permissions for the folders, /var/www/html/Webinterface is a symlink to /home/bot/Club-Manager/Webinterface and all of them got bot:www-data which is the user and group apache2 should use</p>
  <p>Thanks for any tips in advance</p>