{"id":839,"date":"2026-10-15T03:00:00","date_gmt":"2026-10-15T03:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=839"},"modified":"2026-10-15T03:00:00","modified_gmt":"2026-10-15T03:00:00","slug":"install-python-windows-server-2016","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/10\/15\/install-python-windows-server-2016\/","title":{"rendered":"How to Install Python on Windows Server 2016"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To install Python on Windows Server 2016, use the official 64-bit CPython installer, add it to PATH, and create an isolated test environment. The complete setup takes about ten minutes and leaves you with Python, pip, and a repeatable project directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A fully updated 64-bit Windows Server 2016 instance. This guide uses the Python 3.13.16 x64 installer, whose <a href=\"https:\/\/docs.python.org\/3.13\/using\/windows.html\" target=\"_blank\" rel=\"noopener\">official Windows documentation<\/a> lists Windows 8.1 and newer as supported.<\/li>\n\n\n<li>An RDP session and a local administrator account, or an account that can approve an elevated installer and open Administrator PowerShell.<\/li>\n\n\n<li>At least 1 GB of free disk space for Python, pip&#8217;s cache, and a small project. Applications with scientific or compiled dependencies need more.<\/li>\n\n\n<li>Outbound internet access to download the installer and packages from PyPI. A domain name is not required for a local Python installation.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-windows-rdp\">VPSLake Windows RDP server<\/a> if you need a Windows Server environment with administrator access.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Confirm Windows and CPU architecture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The installer must match the server architecture, and the OS check catches a session connected to a different machine before you change anything.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open <strong>Start \u2192 Windows PowerShell<\/strong>, right-click it, choose <strong>Run as administrator<\/strong>, and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,OSArchitecture<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output resembles:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Caption                         Version      OSArchitecture\n-------                         -------      --------------\nMicrosoft Windows Server 2016  10.0.14393  64-bit<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the 32-bit installer only when the command reports <code>32-bit<\/code> or the application has a documented 32-bit dependency. For a normal Server 2016 VPS, continue with the 64-bit installer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Download the official Python installer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The full installer is appropriate for a server because it supports a machine-wide install and does not require the newer Microsoft Store package format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the server&#8217;s browser, open the <a href=\"https:\/\/www.python.org\/downloads\/release\/python-31316\/\" target=\"_blank\" rel=\"noopener\">Python 3.13.16 release page<\/a>. In the <strong>Files<\/strong> section, download <strong>Windows installer (64-bit)<\/strong> and save it in <code>C:\\Users\\Administrator\\Downloads<\/code> or another folder you control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not download the embeddable package for this setup. It is intended for applications that bundle Python and does not provide the normal pip, PATH, and virtual-environment workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install Python for all users<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A machine-wide install puts Python in <code>Program Files<\/code>, registers the <code>py<\/code> launcher, and makes the runtime available to services or administrators who need it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In File Explorer, open the download folder, right-click the installer, and select <strong>Run as administrator<\/strong>. In the Python setup window:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Select <strong>Customize installation<\/strong> so you can review the features instead of accepting a per-user default.<\/li>\n\n\n<li>Leave <strong>pip<\/strong>, <strong>py launcher<\/strong>, and the standard library selected, then select <strong>Next<\/strong>.<\/li>\n\n\n<li>On <strong>Advanced Options<\/strong>, select <strong>Install for all users<\/strong>, <strong>Add Python to environment variables<\/strong>, and <strong>Precompile standard library<\/strong>. Keep the destination <code>C:\\Program Files\\Python313<\/code> unless your software inventory requires another path.<\/li>\n\n\n<li>Select <strong>Install<\/strong>, approve User Account Control, and wait for the success message.<\/li>\n\n\n<li>Select <strong>Disable path length limit<\/strong> if the button appears, then select <strong>Close<\/strong>.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The path-length option removes the historical 260-character limit for applications that opt in to long paths. It does not disable Windows security controls or open a firewall port.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For an unattended deployment, run the same installer from elevated PowerShell. Replace <code>PYTHON_INSTALLER<\/code> with the exact downloaded filename:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Start-Process -FilePath .\\PYTHON_INSTALLER.exe -ArgumentList '\/quiet InstallAllUsers=1 PrependPath=1 Include_test=0' -Wait -PassThru<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The process should return an exit code of <code>0<\/code>. Close any PowerShell or Command Prompt windows that were open before the installation so they reload the updated PATH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Check Python, pip, and PATH<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A fresh terminal confirms that Windows can find the new executable instead of an older copy or an App Execution Alias.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open a new, non-elevated <strong>Windows PowerShell<\/strong> window and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python --version\npy -3.13 --version\npython -m pip --version\nGet-Command python | Select-Object Source<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The version numbers should identify Python 3.13, and the source should point into <code>C:\\Program Files\\Python313<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Python 3.13.16\nPython 3.13.16\npip 25.x from C:\\Program Files\\Python313\\Lib\\site-packages\\pip (python 3.13)\nSource\n------\nC:\\Program Files\\Python313\\python.exe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact pip patch version can differ as the bundled packaging tools change. Prefer <code>python -m pip<\/code> over a bare <code>pip<\/code> command because it guarantees that packages are installed into the interpreter you just selected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Create and run a virtual environment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Virtual environments keep one application&#8217;s dependencies away from the machine-wide runtime, which prevents a package upgrade for one project from breaking another.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a small project and invoke its interpreter directly so PowerShell execution-policy settings do not affect the test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>New-Item -ItemType Directory -Path C:\\PythonApps\\hello -Force | Out-Null\nSet-Location C:\\PythonApps\\hello\npy -3.13 -m venv .venv\n@'\nimport sys\nprint(f\"Python is working: {sys.version.split()[0]}\")\n'@ | Set-Content -Encoding UTF8 .\\hello.py\n.\\.venv\\Scripts\\python.exe -m pip install --upgrade pip\n.\\.venv\\Scripts\\python.exe .\\hello.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output ends with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Python is working: 3.13.16<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For an interactive project session, activate the environment after changing to its folder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-Location C:\\PythonApps\\hello\n.\\.venv\\Scripts\\Activate.ps1\npython --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The prompt normally gains a <code>(.venv)<\/code> prefix. When finished, run <code>deactivate<\/code>; the environment remains on disk for the next session.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Python installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run a module import, a pip check, and the test script from the project directory. These checks prove that the interpreter, standard library, packaging tools, and local file execution all work together:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-Location C:\\PythonApps\\hello\n.\\.venv\\Scripts\\python.exe -c \"import ssl, venv; print('stdlib imports: OK')\"\n.\\.venv\\Scripts\\python.exe -m pip check\n.\\.venv\\Scripts\\python.exe .\\hello.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>stdlib imports: OK\nNo broken requirements found.\nPython is working: 3.13.16<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Installing Python does not create a network service, so this guide does not add a Windows Firewall rule. Only open a port later if an application built with Python is deliberately configured to accept remote traffic.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Run Python on Windows\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">Windows Server hosting<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Run Python on Windows<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Build and run Python applications on a Windows VPS with administrator access and full server control.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-windows-rdp\" aria-label=\"View Windows VPS\">View Windows VPS<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>python<\/code> opens the Microsoft Store or is not recognized<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The current terminal may have an old PATH, or Windows App Execution Aliases may be taking precedence. Close and reopen PowerShell, then run <code>Get-Command python -All<\/code>; if the result points to <code>WindowsApps<\/code> or has no result, rerun the installer with <strong>Add Python to environment variables<\/strong> selected and disable the <code>python.exe<\/code> alias under <strong>Settings \u2192 Apps \u2192 App execution aliases<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>py -3.13<\/code> reports that no installed Python was found<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Python launcher was not installed, or the installer was run only for another user. Repair Python from <strong>Control Panel \u2192 Programs \u2192 Programs and Features \u2192 Python 3.13 \u2192 Change<\/strong>, select the launcher and all-users options, then open a new terminal and retry the command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PowerShell says <code>Activate.ps1<\/code> cannot be loaded<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The execution policy is blocking the activation script, not the Python runtime. You can keep using the environment directly with <code>C:\\PythonApps\\hello\\.venv\\Scripts\\python.exe<\/code>, or allow scripts only for the current PowerShell process:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\n.\\.venv\\Scripts\\Activate.ps1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This temporary setting disappears when that PowerShell window closes. Follow your organization&#8217;s execution-policy policy before changing it on a production server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>pip<\/code> fails while building a package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Some packages contain native extensions and need a compatible prebuilt wheel or a C\/C++ build toolchain. First upgrade pip inside the virtual environment, then check the package&#8217;s own Windows support matrix; do not install a compiler globally just to fix an unrelated pure-Python package.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\\.venv\\Scripts\\python.exe -m pip install --upgrade pip setuptools wheel<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep Windows Server 2016 patched and restrict RDP to trusted source addresses or a VPN; the OS is approaching the end of its extended-support period.<\/li>\n\n\n<li>Run applications under a dedicated, least-privileged service account instead of the local Administrator account.<\/li>\n\n\n<li>Keep each application&#8217;s dependencies in its own <code>.venv<\/code>, pin reviewed versions in <code>requirements.txt<\/code>, and do not install packages globally with an elevated shell.<\/li>\n\n\n<li>If a Python application exposes HTTP or another protocol, put it behind TLS and allow only its required port in <strong>Server Manager \u2192 Tools \u2192 Windows Defender Firewall with Advanced Security<\/strong>.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Which Python version should I install on Windows Server 2016?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This guide uses the latest Python 3.13 maintenance release available at publication time because its official Windows documentation supports Windows 8.1 and newer and the traditional installer works well for server deployments. Choose the minor version required by your application when its dependencies do not yet support 3.13.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is Python free for commercial Windows servers?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The CPython implementation distributed by python.org is open source under the Python Software Foundation License. Review the licenses of third-party packages separately before deploying an application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need administrator rights to run Python?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Administrator approval is useful for a machine-wide install under <code>C:\\Program Files<\/code>, but a user can run Python and use a virtual environment after installation. Keep application files in a directory that the service account can write to without granting it administrator rights.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does installing Python open a port?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Python is an interpreter and does not listen for network connections by itself. A script may start a web server or another listener, but you should expose that service only after configuring authentication, TLS, and a narrowly scoped Windows Firewall rule.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Which Python version should I install on Windows Server 2016?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"This guide uses the latest Python 3.13 maintenance release available at publication time because its official Windows documentation supports Windows 8.1 and newer and the traditional installer works well for server deployments. Choose the minor version required by your application when its dependencies do not yet support 3.13.\"}}, {\"@type\": \"Question\", \"name\": \"Is Python free for commercial Windows servers?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes. The CPython implementation distributed by python.org is open source under the Python Software Foundation License. Review the licenses of third-party packages separately before deploying an application.\"}}, {\"@type\": \"Question\", \"name\": \"Do I need administrator rights to run Python?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Administrator approval is useful for a machine-wide install under `C:\\\\Program Files`, but a user can run Python and use a virtual environment after installation. Keep application files in a directory that the service account can write to without granting it administrator rights.\"}}, {\"@type\": \"Question\", \"name\": \"Does installing Python open a port?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Python is an interpreter and does not listen for network connections by itself. A script may start a web server or another listener, but you should expose that service only after configuring authentication, TLS, and a narrowly scoped Windows Firewall rule.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install Python on Windows Server 2016 with the official 64-bit installer, PATH setup, virtual environment, verification, and common setup errors.","protected":false},"author":1,"featured_media":840,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,11],"tags":[38,67,66,36],"class_list":["post-839","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-windows-server","tag-powershell","tag-programming","tag-python","tag-windows-server-2016","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=839"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":3411,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/839\/revisions\/3411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/840"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}