2

Steps to reproduce:

  1. I created a new project in Visual Studio
  2. Selected Python > Desktop > "IronPython Windows Forms Application"

However, as soon as I open the project I encountered several errors which I don't know how to solve. The errors are unresolved import clr an similar.

Brand New Windows Forms Python Project

3
  • Can you include the full text of the error message you're getting? Commented May 8, 2019 at 21:29
  • Yes. The full text error says "unresolved import clr", "unresolved import System.Drawing", "unresolved import System.Windows.Forms". Commented May 10, 2019 at 21:27
  • Did the steps I listed below help solve your problem? Commented May 11, 2019 at 12:12

1 Answer 1

2

If you're getting the following error unable to resolve 'clr':

Example Error

It's likely that you don't have a python interpreter installed or configured for Visual Studio

Per the question 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

So you need to:

  1. Download IronPython from Github and install it
  2. Then, select the correct Python environment within your VS project.
Sign up to request clarification or add additional context in comments.

1 Comment

Hi KyleMit, sorry for haven't given you an answer sooner. Lot of work and family affairs ... I've installed the IronPython Package and also selected the 3.7 64 bit Python environment but the warnings still appear. It's very surprising this happens. I believe it might be something related to he .NET framework as they are .NET assemblies. Thank you very much for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.