Can't create a virtual environment in the Google Drive folder
<p>I'm using Google Drive to keep a copy of my code projects in case my computer dies (I'm also using GitHub, but not on some private projects).</p>

<p>However, when I try to create a virtual environment using <code>virtualenv</code>, I get the following error:</p>

<pre><code>PS C:\users\fchatter\google drive&gt; virtualenv env
New python executable in C:\users\fchatter\google drive\env\Scripts\python.exe
ERROR: The executable "C:\users\fchatter\google drive\env\Scripts\python.exe" could not be run: [Error 5] Access is denied
</code></pre>

<p>Things I've tried:</p>

<ul>
<li><p>I thought it was because the path to the venv included blank spaces, but the command works in other paths with blank spaces. I also tried installing the win32api library, as recommended in the <code>virtualenv</code> docs, but it didn't work. </p></li>
<li><p>running the PowerShell as an administrator. </p></li>
</ul>

<p>Any ideas on how to solve this? My workaround at the moment is to create the venv outside of the Google Drive, which works but is inconvenient.</p>

<p>Don't set up a virtual env in a cloud synced folder, nor should you run a python script from such a folder. It's a bad idea. They are not meant for version control. Write access (modifying files) to the folder is limited because in your case Google drive will periodically sync the folder which will prevent exclusive write access to the folder almost always. </p>

<p>TLDR; One cant possibly modify files while they are being synced.</p>

<p>I suggest you stick to <code>git</code> for version control.</p>

python powershell virtualenv drive