[英]How can I use Anaconda distribution Python path downloaded in the WSL(Windows Ubuntu 16) as the main python in VSCODE
How can I use Python path downloaded in the Linux/WSL(Windows Ubuntu 16) as the main python in VSCODE?如何使用在 Linux/WSL(Windows Ubuntu 16) 中下载的 Python 路径作为 VSCODE 中的主要 python?
Python Paths Python 路径
Windows Python path: C:\Users\Sam\Anaconda3 Windows Python 路径: C:\Users\Sam\Anaconda3
LINUX/Subsystem/WSL Python path: /root/anaconda3 LINUX/子系统/WSL Python 路径: /root/anaconda3
Current setup当前设置
OS Windows 10 Text Editor VScode Python path (Editor settings) C:\Users\Sam\Anaconda3 Subsytem/WSL Ubuntu Terminal 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操作系统Windows 10编辑器: VScode Python 路径(编辑器设置): /root/anaconda3终端: Wsl ubuntu 终端
Basically I want to direct my VSCode to the Linux python path instead of the windows python path.基本上我想将我的VSCode 引导到Linux python路径而不是windows Z23EEEB4347BDD26BFC6B7EE9路径。 To get from Linux root to windows C:/ directory I go through mnt/c/Users从 Linux根目录到 windows C:/目录 I Z34D1F91FB2E514B856BZntA 到 mA用户
Install and set up the 'Remote - WSL' extension which will let you run VS Code within WSL.安装并设置“Remote - WSL”扩展,它可以让你在 WSL 中运行 VS Code。 Then you can install the Python extension in WSL.然后你可以在 WSL 中安装 Python 扩展。 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.从那里您应该创建一个具有指定 Python 版本的 Anaconda 环境,然后它将被Python 扩展发现,您可以在其中单击状态栏以触发环境选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.