Visual Studio Supports Python

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

Visual Studio now directly supports the Python language. Bottom line: Very nice!

Visual Studio is a complex tool that’s used to write programs for Windows systems. The current version is VS2017. The main languages supported by VS2017 are C# and C++ plus Web languages JavaScript and HTML. But VS2017 supports many other languages.

Support for the Python language was added to VS2017 a couple of months ago. This is something I’ve been waiting for because Python has become the de facto default language for machine learning code. There are plenty of excellent tools you can use to write Python programs, but because I use VS so much, it’s nice to work from VS when writing Python code.

Anyway, I already had VS2017 installed, but I installed it about six months ago when Python support wasn’t available. So, I launched the VS Installer program, then selected the Python module, and installed it.

To test, I created a simple Python demo program that used the NumPy numerical library. The program failed because basic Python doesn’t include NumPy. So I found the VS “Python Environments” window and switched the default environment from plain Python to the Anaconda distribution that includes NumPy and several other important libraries. Then the demo program ran as expected. However, the installed Anaconda was version 4.4.0 and I knew that the CNTK ML library (which I intend to look at next) requires Anaconda version 4.1.1 so, I installed that version, restarted VS, and VS found the new environment. Nice!

I concluded my mini-exploration by checking out the debugger. I was able to tag a couple of objects to Watch, and when I stepped through the program, the values of the objects were displayed as expected.

The moral of the story is that if you work in technology you are always learning — and I mean learning literally every day. And that’s a good thing I think.


Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0