CNTK官方安装教程:https://learn.microsoft.com/zh-cn/cognitive-toolkit/setup-linux-python?tabs=cntkpy27
1. 在conda中创建并激活python=3.6的新环境
- conda create -n cntk python=3.6
- conda activate cntk
2. 安装OpenMPI
yum install openmpi-bin
3. 安装cntk-gpu
pip install cntk-gpu
报错:
问题原因:LD_LIBRARY_PATH路径下没有libmpi_cxx.so.1包导致的。
解决方法:
- ln -s /path-to-anaconda3/envs/cntk/lib/libmpi_cxx.so.20 ${LD_LIBRARY_PATH}/libmpi_cxx.so.1
- ln -s /path-to-anaconda3/envs/cntk/lib/libmpi.so.20.10.1 ${LD_LIBRARY_PATH}/libmpi.so.12
python -c "import cntk; print(cntk.__version__)"
参考:
https://youtrack.jetbrains.com/issue/PY-29580/PyCharm-doesnt-set-LDLIBRARYPATH-when-running-scripts