title: Activating Python virtual environment on Windows
body: <p>Note: People have marked this as a duplicate of another question but it is not. There is something off about my virtualenv and I have not been able to resolve it. It might have to do with how Visual Studio sets it up.</p>
  <p>I have been following along with this excellent <a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world" rel="nofollow noreferrer">tutorial on flask</a></p>
  <p>I ran into a problem when I tried to activate the virtual environment on Windows. How do you execute <code>$ venv\Scripts\activate</code>? Is this supposed to be from the command prompt or Powershell?  I have used Visual Studio as my IDE. It creates for you a VS solution that has a basic flask app to start with. In the process of creating the app it asks you to create a virtual environment.  It creates that virtual environment in a directory similar to the one shown in the tutorial. <code>\venv\Scripts</code> exits but it does not have a file or executable called &quot;activate&quot;.</p>
  <p>here is the content of the Scripts folder:</p>
  <blockquote>
  <p>api-ms-win-core-console-l1-1-0.dll api-ms-win-core-datetime-l1-1-0.dll</p>
  <p>api-ms-win-core-debug-l1-1-0.dll</p>
  <p>api-ms-win-core-errorhandling-l1-1-0.dll</p>
  <p>api-ms-win-core-file-l1-1-0.dll api-ms-win-core-file-l1-2-0.dll</p>
  <p>api-ms-win-core-file-l2-1-0.dll api-ms-win-core-handle-l1-1-0.dll</p>
  <p>api-ms-win-core-heap-l1-1-0.dll api-ms-win-core-interlocked-l1-1-0.dll</p>
  <p>api-ms-win-core-libraryloader-l1-1-0.dll</p>
  <p>api-ms-win-core-localization-l1-2-0.dll</p>
  <p>api-ms-win-core-memory-l1-1-0.dll api-ms-win-core-namedpipe-l1-1-0.dll</p>
  <p>api-ms-win-core-processenvironment-l1-1-0.dll</p>
  <p>api-ms-win-core-processthreads-l1-1-0.dll</p>
  <p>api-ms-win-core-processthreads-l1-1-1.dll</p>
  <p>api-ms-win-core-profile-l1-1-0.dll</p>
  <p>api-ms-win-core-rtlsupport-l1-1-0.dll</p>
  <p>api-ms-win-core-string-l1-1-0.dll api-ms-win-core-synch-l1-1-0.dll</p>
  <p>api-ms-win-core-synch-l1-2-0.dll api-ms-win-core-sysinfo-l1-1-0.dll</p>
  <p>api-ms-win-core-timezone-l1-1-0.dll api-ms-win-core-util-l1-1-0.dll</p>
  <p>api-ms-win-crt-conio-l1-1-0.dll api-ms-win-crt-convert-l1-1-0.dll</p>
  <p>api-ms-win-crt-environment-l1-1-0.dll</p>
  <p>api-ms-win-crt-filesystem-l1-1-0.dll api-ms-win-crt-heap-l1-1-0.dll</p>
  <p>api-ms-win-crt-locale-l1-1-0.dll api-ms-win-crt-math-l1-1-0.dll</p>
  <p>api-ms-win-crt-multibyte-l1-1-0.dll api-ms-win-crt-private-l1-1-0.dll</p>
  <p>api-ms-win-crt-process-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll</p>
  <p>api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-string-l1-1-0.dll</p>
  <p>api-ms-win-crt-time-l1-1-0.dll api-ms-win-crt-utility-l1-1-0.dll</p>
  <p>concrt140.dll msvcp140.dll pyexpat.pyd python.exe python3.dll</p>
  <p>python36.dll pythoncom36.dll pythonw.exe pywintypes36.dll select.pyd</p>
  <p>sqlite3.dll tcl86t.dll tk86t.dll ucrtbase.dll unicodedata.pyd</p>
  <p>vccorlib140.dll vcomp140.dll vcruntime140.dll winsound.pyd</p>
  <p>xlwings32.dll xlwings64.dll</p>
  <p>_asyncio.pyd</p>
  <p>_bz2.pyd</p>
  <p>_ctypes.pyd</p>
  <p>_ctypes_test.pyd</p>
  <p>_decimal.pyd</p>
  <p>_elementtree.pyd</p>
  <p>_hashlib.pyd</p>
  <p>_lzma.pyd</p>
  <p>_msi.pyd</p>
  <p>_multiprocessing.pyd</p>
  <p>_overlapped.pyd</p>
  <p>_socket.pyd</p>
  <p>_sqlite3.pyd</p>
  <p>_ssl.pyd</p>
  <p>_testbuffer.pyd</p>
  <p>_testcapi.pyd</p>
  <p>_testconsole.pyd</p>
  <p>_testimportmultiple.pyd</p>
  <p>_testmultiphase.pyd</p>
  <p>_tkinter.pyd</p>
  </blockquote>
  <p>I got all the way to <a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database" rel="nofollow noreferrer">data migration section</a> but here I need to run the <code>(venv) $ flask db migrate</code></p>
  <p>I am at a loss on how to get into the virtual environment to run this.</p>