title: Allow Python.app on El Capitan (OS X)
body: <p><a href="https://i.stack.imgur.com/WKi5J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WKi5J.png" alt="enter image description here"></a></p>
  
  <p>I'm using a <code>python</code> executable in a <strong>virtual environment</strong>. I tried doing the whole <code>codesign</code> thing as described <a href="http://wpguru.co.uk/2015/06/how-to-kill-the-accept-incoming-connections-dialogue-on-your-mac-forever/" rel="nofollow noreferrer">here</a>, including creating the certificate, etc.  The command worked, but the result stayed the same.  I think it used to work on previous versions of OS X, but I currently use the most recent El Capitan version (10.11.6) and it's not working anymore.  Any ideas on how to fix it?</p>
  
  <p><strong>EDIT</strong>: I did see <a href="https://stackoverflow.com/questions/34760163/how-to-allow-python-app-to-firewall-on-mac-os-x">this</a> solution, but since my python is in a virtual environment, I'm not sure it applies, unless you guys say otherwise...</p>
  
  <p><strong>EDIT 2</strong>: I tried the solution above, didn't work. <strong>I should mention that I am codesigning the python executable in the virtualenv</strong>.</p>
  
  <p><strong>EDIT 3</strong>: The thing that ended up working for me was upgrading <code>flask</code> to the current version, (using <code>pip install flask --upgarde</code>), and running the app with <code>export FLASK_APP=app.py; flask run</code> instead of with <code>python app.py</code>.  When you run the app with <code>flask run</code>, the annoying dialog box doesn't pop up anymore.  No codesigning needed to my knowledge.  Hope this helps someone.</p>