天天看点

python运行配置不正确,Visual Studio-“环境IronPython | 2.7-32似乎配置不正确或丢失”...

python运行配置不正确,Visual Studio-“环境IronPython | 2.7-32似乎配置不正确或丢失”...

Steps to the Reproduce:

Open Visual Studio 2017 (Pro on Windows 10 64-bit)

File > New Project > IronPython Application

Run the default program: print('Hello world')

When I run it, I get the following error:

The environment "IronPython|2.7-32" appears to be incorrectly configured or missing.

You may need to install it or create a virtual environment

python运行配置不正确,Visual Studio-“环境IronPython | 2.7-32似乎配置不正确或丢失”...

I went to VS Installer, Individual Components tab, Compilers section, and checked on the Python 2.7 & 3.6 selections, but I'm still getting the problem

解决方案

You need to set up the IronPython 2.7 environment*.

*Currently you cannot do it through the Visual Studio Installer (there isn't an IronPython Package option to install).

You need to download IronPython and install it separately from Github.

If the IronPython 2.7 environment is not properly set then you have to do it manually

Hopefully, Microsoft will patch this in the future.