Build a Docker container with this Dockerfile:
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y python3-dev python3-pip openmpi-bin
RUN pip3 install --upgrade pip
RUN pip3 install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.2-cp35-cp35m-linux_x86_64.whl
Then in the container, run python3 -c "import cntk; print(cntk.__version__)".
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/cntk/cntk_py.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'cntk._cntk_py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/cntk/__init__.py", line 10, in <module>
from . import cntk_py
File "/usr/local/lib/python3.5/dist-packages/cntk/cntk_py.py", line 21, in <module>
_cntk_py = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/cntk/cntk_py.py", line 20, in swig_import_helper
return importlib.import_module('_cntk_py')
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory
The version 2.2 is output to console.
This issue does not reproduce when repeating the steps and replacing the 2.2 with 2.1 in the Dockerfile.
You need to install OpenCV first. This is a breaking requirement as described in the release notes.
Huh, that did the trick. Works now after adding a libopencv-dev and python-opencv package to the example.
When I saw that note in the release notes I thought it would only impact the Tensorboard feature, and since OpenCV is a heavy dependency I would prefer to avoid it.
At the least, the OpenCV dependency should be mentioned in the Microsoft Python-only install documentation.
Closing.
Most helpful comment
Huh, that did the trick. Works now after adding a
libopencv-devandpython-opencvpackage to the example.When I saw that note in the release notes I thought it would only impact the Tensorboard feature, and since OpenCV is a heavy dependency I would prefer to avoid it.
At the least, the OpenCV dependency should be mentioned in the Microsoft Python-only install documentation.
Closing.