python安装卡在core interpreter_选择并安装 Python 解释器 - Visual Studio | Microsoft Docs

安装 Python 解释器Install Python interpreters06/05/2019本文内容默认情况下,在 Visual Studio 2017 和更高版本中安装 Python 开发工作负载也会同时安装 Python 3(64 位)。By default, installing the Python development workload in Visual Studio 201...
摘要由CSDN通过智能技术生成

安装 Python 解释器Install Python interpreters

06/05/2019

JoshuaPartlow.png?size=32

olprod.png?size=32

本文内容

默认情况下,在 Visual Studio 2017 和更高版本中安装 Python 开发工作负载也会同时安装 Python 3(64 位)。By default, installing the Python development workload in Visual Studio 2017 and later also installs Python 3 (64-bit). 可以根据需要选择安装 32 位和 64 位版本的 Python 2 和 Python 3,并安装 Miniconda (Visual Studio 2019) 或者 Anaconda 2/Anaconda 3 (Visual Studio 2017),如安装中所述。You can optionally choose to install 32-bit and 64-bit versions of Python 2 and Python 3, along with Miniconda (Visual Studio 2019) or Anaconda 2/Anaconda 3 (Visual Studio 2017), as described in Installation.

或者,也可以从“添加环境” 对话框中安装标准 Python 解释器。Alternately, you can install standard python interpreters from the Add Environment dialog. 在“Python 环境”窗口或 Python 工具栏中选择“添加环境”命令,选择“Python 安装”选项卡,指示安装哪个解释器,并选择“安装”。Select the Add Environment command in the Python Environments window or the Python toolbar, select the Python installation tab, indicate which interpreters to install, and select Install.

除了 Visual Studio 安装程序,还可以手动安装下表列出的任何解释器。You can also manually install any of the interpreters listed in the table below outside of the Visual Studio installer. 例如,如果在安装 Visual Studio 之前安装了 Anacon

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是在 Visual Studio Code 中添加 pytorch 和 tensorflow 虚拟环境的 python 解释器的步骤: 1. 创建虚拟环境 首先,你需要在你的系统中安装好 pytorch 和 tensorflow,并创建好虚拟环境。在命令行中执行以下命令: ``` # 创建 pytorch 虚拟环境 conda create --name pytorch_env pytorch # 创建 tensorflow 虚拟环境 conda create --name tensorflow_env tensorflow ``` 2. 打开 Visual Studio Code 打开 Visual Studio Code,并打开你要使用的工作区。 3. 打开命令面板 按下 `Ctrl + Shift + P` 或者 `Command + Shift + P` 打开命令面板。 4. 选择解释器 在命令面板中输入 “Python: Select Interpreter” 并选择该命令。 5. 选择虚拟环境 在弹出的选项中,选择你要使用的虚拟环境。例如,如果你要使用 pytorch 环境,则选择 `anaconda3/envs/pytorch_env/bin/python`。如果你要使用 tensorflow 环境,则选择 `anaconda3/envs/tensorflow_env/bin/python`。 6. 配置工作区设置 在 Visual Studio Code 的左侧边栏中,点击 “设置” 按钮,打开工作区设置。在工作区设置中添加以下配置: ``` "python.pythonPath": "anaconda3/envs/pytorch_env/bin/python", // 使用 pytorch 环境 或 "python.pythonPath": "anaconda3/envs/tensorflow_env/bin/python", // 使用 tensorflow 环境 ``` 7. 确认配置 保存工作区设置并重新启动 Visual Studio Code。确认你的配置是否生效。 现在,你就可以在 Visual Studio Code 中使用你的 pytorch 或 tensorflow 虚拟环境了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值