Setting up Visual Studio 2017 for data science applications

Installing SQL Server 2017 Machine Learning Services is covered in Chapter 15, Introducing Python. Here, Visual Studio 2017 is introduced. You can use either the Professional or free Community Edition (https://www.visualstudio.com/downloads/) to develop Python and R code.

When installing Visual Studio 2017, be sure to select Python development workload, and then data science and analytical applications, as the following screenshot shows. This will install Python language templates, including data science templates, and also R Tools for Visual Studio 2017:

Visual Studio 2017 setup for data science

There you go, you are nearly ready. There is a small trick here. VS 2017 also installs its own Python interpreter. In order to use the scalable one installed with SQL Server, the one that enables executing code in the Database Engine context and includes Microsoft scalable libraries, you need to set up an additional Python environment, pointing to the scalable version of the interpreter. The path for this scalable interpreter is, if you installed the default instance of SQL Server, C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERPYTHON_SERVICESpython.exe. You can see how to set up this environment in the following screenshot. Note that there is no need for any additional step for developing R code, because VS 2017 also installs the Microsoft R Client, the open R engine that includes the Microsoft scalable libraries:

Setting up Python environments

That’s it. You are ready to start Python programming. Just start a new project and select the Python Application template from the Python folder. You can also explore the Python Machine Learning templates, which include Classifier, Clustering, and Regression projects. If you selected the Python Application template, you should have open the first empty Python script with a default name, the same as the project name, and the default extension .py, waiting for you to write and interactively execute Python code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.129.90