Add CNTK virtualenv to Visual Studio Python project

后端 未结 1 1586
余生分开走
余生分开走 2020-12-09 13:22

I followed Setup CNTK on Windows, and confirmed that I can run CTNK from my local command prompt.

C:\\local\\Anaconda3-4.1.1-Windows-x86_64\\envs\\cntk-py34&         


        
相关标签:
1条回答
  • 2020-12-09 13:55

    Here the steps that I use for existing conda env from Visual Studio:

    1. Create your Anaconda environment as mentioned in the setup instruction (you already done that).
    2. In VS, from View->Other Windows select “Python Environments”. a. Add a custom environment, and fill all the fields from your Anaconda environment path, yours is: "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py34" b. Make sure that the version is 3.4 and Architecture is x64. c. Then click Apply, Apply will take long to complete, there will be an inline progress bar wait for it to finish.
    3. In the solution explorer, under your python project: a. Right click on “Python Environments” and select “Add\Remove Python Environments”. b. Select the custom environment that you added in (2)
    4. Close Visual Studio, and activate the Anaconda environments that you created in (1). a. From this environment type (the path to your VS x64 native environment): "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 b. Launch Visual Studio from this environment by typing “devenv.exe”.

    Step (4) is crucial, or Visual Studio won't find CNTK dependency DLLs.

    0 讨论(0)
提交回复
热议问题