Skip to content

Setup CNTK Python Tools For Windows

Chris Basoglu edited this page Feb 8, 2017 · 17 revisions

If you want to use Python Tools for Visual Studio (PTVS):

  • First determine your path to Visual studio (like: "c:\Program Files (x86)\Microsoft Visual Studio 14.0"). Take that path and create an environment variable named MYVSPATH. set MYVSPATH=thePathToVSDescribedAbove.
  • Next get the path to your CNTK installation:
  • If you have a binary install, (take a look in c:\local). For example if you installed CNTK2.0Beta10, you would have a path like: c:\local\CNTK-2-0-beta10-0-Windows-64bit-GPU. Take that path and create an environment variable named MYCNTKPATH: set MYCNTKPATH=thePathToCNTKDescribedAbove.
  • If you have a source install, find the path just above where you cloned. That is just above the cntk dir. Take that path and create an environment variable named MYCNTKPATH: set MYCNTKPATH=thePathToCNTKDescribedAbove.
  • Next Setup your environment with %MYVSPATH%\vc\vcvarsall.bat amd64.
  • Next depending on your install type:
  • If you have a binary install update your PATH environment with set PATH=%MYCNTKPATH%\cntk\cntk;%PATH%.
  • If you have a source install, and built Release, do set PATH=%MYCNTKPATH%\cntk\x64\Release;%PATH%. If you built something different than Release, specify that instead.
  • Then open Visual Studio with %MYVSPATH%\Common7\IDE\devenv.exe
  • In VS, go to Tools -> Python Tools -> Python Environments and create a new environment (by clicking on the "+Custom" button).
  • Select Configure from the dropdown menu and set the prefix path to the environment dir inside Anaconda. If you did a binary install, this path is likely to be: C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\.
  • Afterwards, click Auto Detect and the rest of the entries will be filled out automatically.

Links

Clone this wiki locally