https://docs.microsoft.com/en-us/cognitive-toolkit/setup-linux-python?tabs=cntkpy27#anaconda3
pip install in an environment
Below we will create a new Python 3.5 environment inside Anaconda called cntk-py35
and will pip-install CNTK into this environment. If you want a different CNTK version, Python version, or environment name, please adjust the parameters accordingly.
Open a command shell, create the environment, make it active, and pip-install CNTK:
$ conda create --name cntk-py35 python=3.5 numpy scipy h5py jupyter
$ activate cntk-py35
$ pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.6-cp35-cp35m-linux_x86_64.whl
conda create --name cntk-py35 python=3.5 numpy scipy h5py jupyter
activate cntk-py35
[上面的命令没有安装成功,用这个
~/anaconda3/bin$ pip3 install cntk
Collecting cntk
Cache entry deserialization failed, entry ignored
Using cached https://files.pythonhosted.org/packages/8e/02/0fbfa3ec554414150be46fde7a8e687104db944a6a55dfdbffe421373695/cntk-2.7.post1-cp36-cp36m-manylinux1_x86_64.whl
Collecting numpy>=1.11 (from cntk)
Using cached https://files.pythonhosted.org/packages/87/2d/e4656149cbadd3a8a0369fcd1a9c7d61cc7b87b3903b85389c70c989a696/numpy-1.16.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting scipy>=0.17 (from cntk)
Using cached https://files.pythonhosted.org/packages/72/4c/5f81e7264b0a7a8bd570810f48cd346ba36faedbd2ba255c873ad556de76/scipy-1.3.0-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: numpy, scipy, cntk
Successfully installed cntk-2.7 numpy-1.16.4 scipy-1.3.0
]
测试
$ python -c "import cntk; print(cntk.__version__)"