0

How can I use Python path downloaded in the Linux/WSL(Windows Ubuntu 16) as the main python in VSCODE?

Python Paths

Windows Python path: C:\Users\Sam\Anaconda3

LINUX/Subsystem/WSL Python path: /root/anaconda3

Current setup

OS Windows 10 Text Editor VScode Python path (Editor settings) C:\Users\Sam\Anaconda3 Subsytem/WSL Ubuntu Terminal

Preferred Setup

OS Windows 10 Editor: VScode Python path (Editor Settings): /root/anaconda3 Terminal: Wsl ubuntu terminal

Basically I want to direct my VSCode to the Linux python path instead of the windows python path. To get from Linux root to windows C:/ directory I go through mnt/c/Users

Ulrich Eckhardt
  • 16,572
  • 3
  • 28
  • 55
Rahim
  • 11
  • 1

1 Answers1

0

Install and set up the 'Remote - WSL' extension which will let you run VS Code within WSL. Then you can install the Python extension in WSL. From there you should create an Anaconda environment with a specified Python version and then it will be discoverable by the Python extension where you can click in the status bar to trigger the environment selection.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40