Eugene
Eugene

Reputation: 61

Can't run Python script in Visual Studio

I have installed Python Tools for Visual Studio 2015. Also I have Python 3.6 installed. The main propblem is that i can't even run simple script like:

print("Hello World")

I cant' even see error properly. The window closes too fast. The only thing i have recognized is "Error 21 invalid arguments" or something like this.

My Python Environment is:

Prefix Path: C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32*

Interpreter path C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\python.exe

Windowed interpreter C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\pythonw.exe

Language version: 3.5

Architecture: 32-bit

Path environment variable: PATH

On my computer PATH variable contains strings such as: C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\Scripts\; C:\Users\Eugene\AppData\Local\Programs\Python\Python36-32\;

Upvotes: 0

Views: 4089

Answers (2)

Eugene
Eugene

Reputation: 61

I find an error. The problem was that i have created IronPython project not Python. Right now i have created Python project and everything works fine. By the way my Visual Studio recognizes Python directory.

Upvotes: 1

Greg Salomons
Greg Salomons

Reputation: 44

Visual Studio 2015 does not recognize Python 3.6 You can still use it but you have to explicitly set the environment to the Python 3.6 each time you start Visual Studio.

Upvotes: 2

Related Questions