python - Visual Studio 中的 Windows 窗体与 Python

标签 python python-3.x visual-studio winforms ironpython

重现步骤:

  1. 我在 Visual Studio 中创建了一个新项目
  2. 选定的 Python > 桌面 >“IronPython Windows 窗体应用程序”

但是,当我打开项目时,我遇到了几个错误,我不知道如何解决。错误未解决 import clr 类似。

Brand New Windows Forms Python Project

最佳答案

如果您收到以下错误无法解析“clr”:

Example Error

您可能没有为 Visual Studio 安装配置 python 解释器

根据问题The environment ironpython 2.7-32 appears to be incorrectly configured or missing

The Visual Studio Installer does not include an IronPython Package option to install

所以你需要:

  1. Download IronPython from Github并安装它
  2. 然后,选择正确的 Python environment within your VS project .

关于python - Visual Studio 中的 Windows 窗体与 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56048898/

相关文章:

python - 定义抽象类的三种方式的区别

python - 从给定二维列表中相同坐标的列表中选择最小值

c++ - visual studio 中 GNU tm 的等价物是什么?

c - intmax_t C 中的数据类型

python - 使用 python simple-salesforce 访问 salesforce 元数据

python - 如何在 read_csv 中将非数字条目转换为 NaN

python - 在 Python for 循环中创建多个绘图

python - (Python) 如何获取xml中节点的级别?

python - 正则表达式选择性地包含分隔符

visual-studio - CreateAppHost 任务意外失败。 MSB4018