In the next few steps will show how to install CNTK and python environment in Visual Studio 2017.
- First download the latest CNTK version from the official GitHub page, or just click on the following link: https://github.com/Microsoft/CNTK/releases
The release page will show the latest bits. Click on the CPU only package, accept the license and download the zip file.
- Once that you have zip file on your PC, create the folder C:/local on disk and unzip the package in to it.
- The next step performs the installation of the library as well as installation of the Python related distribution anaconda 4.1.1.
- Open C:\local\cntk\Scripts\install\windows path and run install.bat file. You will need administrative rights in order to successfully install all required components.
- The following image shows the installation process:
- As can be seen first you have to run batch file (step 2), then press 1 and ENTER in order to continue with the installation process and press ‘y‘, to perform downloading required components.
- The installation process takes several minutes to complete. The first component to be installed is Anaconda 4.1.1 which is needed in order to setup CNTK.
- Once the anaconda is installed, the process of CNTK installation starts and passes very quickly since we already download all CNTK bits.
- Now that we have CNTK installed, the last installation step is installation of the Visual Studio Tool for Python.
- Run the Visual Studio 2017 Installer and after the installed is show, just select the python components similar picture shows below:
- Once the installation is completed run Visual Studio 2017.
- From the Visual Studio 2017 Tool menu select Python and then select Python Environment:
- From the Python Environment window select Anaconda 4.1.1 and update symbols DB, by pressing the button pointed on the image below:
- Once we have environment updated, Press “Make this the default environment for the new projects” option in order to apply the environment for the future Python CNTK based projects.
- Also the path for Python and Python scripts should be registered in Global Environment OS.
- Once the previous steps are performed successfully, we can start writing CNTK aware python code in Visual Studio 2017.
- OPen VS 2017 and Anaconda 4.1.1 environment and type.
print(“CNTK verion:”, cntk__version__)
- Similar output should be appear
- print(“CNTK version:”, cntk.__version__)