<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://info.stat.cmu.edu/index.php?action=history&amp;feed=atom&amp;title=Windows_Subsystem_for_Linux_%28WSL%29_and_Python</id>
	<title>Windows Subsystem for Linux (WSL) and Python - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://info.stat.cmu.edu/index.php?action=history&amp;feed=atom&amp;title=Windows_Subsystem_for_Linux_%28WSL%29_and_Python"/>
	<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Windows_Subsystem_for_Linux_(WSL)_and_Python&amp;action=history"/>
	<updated>2026-11-04T21:59:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Windows_Subsystem_for_Linux_(WSL)_and_Python&amp;diff=851&amp;oldid=prev</id>
		<title>Ajshen at 03:37, 29 June 2026</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Windows_Subsystem_for_Linux_(WSL)_and_Python&amp;diff=851&amp;oldid=prev"/>
		<updated>2026-06-29T03:37:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:37, 29 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Terminal and Command Line]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;What we want to achieve is a fully-fledged Linux development environment inside Windows. Specifically, we want to run Visual Studio Code within Windows but the rest of the development tools (Python, Git, flake8, etc.) within the Windows Subsystem for Linux (WSL). To set this up, do the following:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;What we want to achieve is a fully-fledged Linux development environment inside Windows. Specifically, we want to run Visual Studio Code within Windows but the rest of the development tools (Python, Git, flake8, etc.) within the Windows Subsystem for Linux (WSL). To set this up, do the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ajshen</name></author>
	</entry>
	<entry>
		<id>https://info.stat.cmu.edu/index.php?title=Windows_Subsystem_for_Linux_(WSL)_and_Python&amp;diff=29&amp;oldid=prev</id>
		<title>Skipper: Created page with &quot; What we want to achieve is a fully-fledged Linux development environment inside Windows. Specifically, we want to run Visual Studio Code within Windows but the rest of the de...&quot;</title>
		<link rel="alternate" type="text/html" href="https://info.stat.cmu.edu/index.php?title=Windows_Subsystem_for_Linux_(WSL)_and_Python&amp;diff=29&amp;oldid=prev"/>
		<updated>2024-03-29T23:56:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; What we want to achieve is a fully-fledged Linux development environment inside Windows. Specifically, we want to run Visual Studio Code within Windows but the rest of the de...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
What we want to achieve is a fully-fledged Linux development environment inside Windows. Specifically, we want to run Visual Studio Code within Windows but the rest of the development tools (Python, Git, flake8, etc.) within the Windows Subsystem for Linux (WSL). To set this up, do the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Install Anaconda within WSL&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Run in WSL:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt update&lt;br /&gt;
sudo apt upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to update Ubuntu packages to their latest versions. Then run&amp;amp;nbsp;&lt;br /&gt;
&amp;lt;pre&amp;gt;wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to download the Anaconda installer.&amp;amp;nbsp;Start the installer using&lt;br /&gt;
&amp;lt;pre&amp;gt;bash Anaconda3-2022.05-Linux-x86_64.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the prompts. Answer, &amp;#039;yes&amp;#039; when the installer asks if you want to initialize Anaconda3.&amp;amp;nbsp;Once the installer has finished, restart the WSL Ubuntu terminal.&lt;br /&gt;
&lt;br /&gt;
You should now have a working Anaconda installation in WSL. You can check this by running&lt;br /&gt;
&amp;lt;pre&amp;gt;python --version&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start a Jupyter server in WSL by running&lt;br /&gt;
&amp;lt;pre&amp;gt;jupyter notebook --no-browser&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then connect to the Jupyter server by opening a browser in the host Windows and going to the localhost address shown in the WSL terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Install Visual Studio Code in Windows (not WSL)&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Go to [https://code.visualstudio.com/ https://code.visualstudio.com/] and download the VS Code installer for Windows. Run the installer and follow the prompts. Make sure that the option to add VS Code to the path is checked during installation.&lt;br /&gt;
&lt;br /&gt;
Start VS Code from &amp;lt;u&amp;gt;Windows&amp;lt;/u&amp;gt; (&amp;#039;&amp;#039;not&amp;#039;&amp;#039; WSL). Install the &amp;quot;Remote Development&amp;quot; extension pack in VS Code. Close VS Code. Then restart it from WSL using&lt;br /&gt;
&amp;lt;pre&amp;gt;code .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see a prompt that says that WSL is installing a VS Code server. Once that&amp;#039;s finished, VS Code should start in the host Windows. This is a special VS Code session that is linked to WSL. You know that this step was successful if you see a green indicator in the lower left-hand corner of the VS Code window indicating that it is connected to WSL.&lt;br /&gt;
&lt;br /&gt;
Now install the Python extension in VS Code. You should see that it will be installed as a remote extension in WSL instead of the host Windows system. Installing the Python extension should also install the Jupyter extension by default.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Note about graphical displays&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
The only limitation with the above setup is that it might not be able to open graphical displays from WSL. You can test this by running&lt;br /&gt;
&amp;lt;pre&amp;gt;anaconda-navigator&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on WSL command line which should open a graphical user interface for Anaconda. If you&amp;#039;re running the latest version of Windows 11 and WSL, this might work out-of-the-box for you. If it doesn&amp;#039;t or if you&amp;#039;re running Windows 10, you&amp;#039;ll need to install an X window server to host the graphics in Windows. You can for example use MobaXterm ([https://mobaxterm.mobatek.net/download.html https://mobaxterm.mobatek.net/download.html])&amp;amp;nbsp;for this. Download and install MobaXterm and then start the WSL session from MobaXterm. You should now be able to see graphical displays, including those created by Python scripts even when run from VS Code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Additional Resources&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
-&amp;amp;nbsp;[https://www.how2shout.com/how-to/install-anaconda-wsl-windows-10-ubuntu-linux-app.html https://www.how2shout.com/how-to/install-anaconda-wsl-windows-10-ubuntu-linux-app.html]&lt;br /&gt;
&lt;br /&gt;
-&amp;amp;nbsp;[https://gist.github.com/kauffmanes/5e74916617f9993bc3479f401dfec7da https://gist.github.com/kauffmanes/5e74916617f9993bc3479f401dfec7da]&lt;br /&gt;
&lt;br /&gt;
-&amp;amp;nbsp;[https://code.visualstudio.com/docs/remote/wsl https://code.visualstudio.com/docs/remote/wsl]&lt;/div&gt;</summary>
		<author><name>Skipper</name></author>
	</entry>
</feed>