Anaconda: install OpenCV 3.4.1 on Windows 10

conda install … opencv, conda install … opencv-python ruined my environment built on Windows 10. The error seemed to related to PyQt and authentication/path setting but couldn’t specify the true cause.

So, instead of using anaconda binary, I tried unofficial windows binary and it worked 🙂 The required steps are
1. Go to the site
2. Download .whl file appropriate for your environment, say RIGHT_BINARY.whl (opencv_python‑3.4.1‑cp36‑cp36m‑win_amd64.whl in my case)
3. install by pip install RIGHT_BINARY.whl


libcudnn related error after Ubuntu apt update

I got “ImportError of libcudnn.so.6” after Ubuntu apt update although I have no idea how apt update causes the error. The solution is re-install cuDNN.

Library files of cuDNN disappeared from a directory where is one of LD_LIBRARY_PATH. So, I just followed a guidance here.

  1. download cuDNN version 6.0
  2. copy the header and lib files as
    sudo cp include/cudnn.h /usr/local/cuda-8.0/include
    sudo cp lib64/lib* /usr/local/cuda-8.0/lib64/
  3. make symbolic links
    sudo chmod +r libcudnn.so.6.0.21
    sudo ln -sf libcudnn.so.6.0.21 libcudnn.so.6
    sudo ln -sf libcudnn.so.6 libcudnn.so
    sudo ldconfig

Keras: plot_model returns pydot and graphviz related error on Windows

plot_model of Keras installed on Windows may return pydot and graphviz related error like “Graphviz’s executables are not found’. The error cause is that the computer does not know the path of Graphviz’s executable exactly mentioned as the error message. The solution is explained here.

  1. Install GraphViz software not python module
  2. add GraphViz’s bin directory to system path
  3. install graphviz like conda install graphviz
  4. install pydot like pip install git+https://github.com/nlhepler/pydot.git