title: Where is the proper place to put Python virtual environments according to the Linux Filesystem Hierarchy Standard?
body: <p>As the title asks, what is the technically proper location to store Python virtual environments on Linux operating systems according to the Linux FHS?  </p>
  
  <p>Stated another way that allows for a clear answer: Is it "technically correct" to separate the location of a Python virtual environment from the data files you are serving?</p>
  
  <p>Note: <a href="https://stackoverflow.com/questions/17830948/conform-with-file-hierarchy-standard-on-linux-where-to-put-binary-examples-for">This question differs from the closest, already-asked question I could find</a>, as virtual-environments contain libraries, binaries, header files, and scripts.</p>
  
  <p>As an added complication, I tend to write code that supports internet-accessible services.  However, I don't see this as substantially differentiating my needs from scenarios in which the consumers of the service are other processes on the same server.  I'm mentioning this detail in case my responses to comments include "web dev"-esque content.</p>
  
  <p>For reference, I am using the following documentation as my definition of the Linux FHS: <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html" rel="noreferrer">http://www.pathname.com/fhs/pub/fhs-2.3.html</a></p>
  
  <p>I do not believe the popular virtualenv-wrapper script suggests the correct action, as it defaults to storing virtual environments in a user's home directory.  This violates the implicit concept that the directory is for user-specific files, as well as the statement that "no program should rely on this location."</p>
  
  <p>From the root level of the file system, I lean towards <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY" rel="noreferrer"><code>/usr</code></a> (shareable, read-only data) or <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM" rel="noreferrer"><code>/srv</code></a> (Data for services provided by this system), but this is where I have a hard time deciding further.</p>
  
  <p>If I was to go alongside the decision of my go-to reverse proxy, that means <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY" rel="noreferrer"><code>/usr</code></a>.  Nginx is commonly packaged to go into /usr/share/nginx or /usr/local/nginx, however, /usr/ is supposed to be <a href="http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html#var" rel="noreferrer">mounted read-only according to the FHS</a>.  I find this strange because I've never worked on a single project in which development happened so slowly that "unmount as read-only/remount with write, unmount/remount as read-only" was considered worth the effort.</p>
  
  <p><a href="http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM" rel="noreferrer"><code>/srv</code></a> is another possible location, but is stated as the "location of the data files for particular service," whereas a Python virtual environment is more focused on libraries and binaries for what provides a service (without this differentiation, <code>.so</code> files would also be in srv).  Also, multiple services with the same requirements could share a virtual environment, which violates the "particular" detail of the description.</p>
  
  <p>I believe that part of the difficulty in choosing a correct location is because the virtual environment is an "environment," which consists of both binaries and libraries (almost like its own little hierarchy), which pushes my impression that somewhere under <code>/usr</code> is more conventional:</p>
  
  <pre><code>virtual-env/
  ├── bin          ~= /usr/local : "for use by the system administrator when installing software locally" 
  ├── include      ~= /usr/include : "Header files included by C programs"
  ├── lib          ~= /usr/lib : "Libraries for programming and packages"
  └── share        ~= /usr/local
  </code></pre>
  
  <p>With my assumptions and thoughts stated: consider the common scenario of Nginx acting as a reverse proxy to a Python application.  Is it correct to place a virtual environment and source code (e.g. application.py) under <code>/usr/local/service_name/</code> while using <code>/srv</code> for files that are changed more often (e.g. 'static' assets, images, css)?</p>
  
  <p>edit: To be clear: I know why and how to use virtualenvs.  I am by no means confused about project layouts or working in development environments. </p>