title: python docker-py client is newer than server
body: <p>I want to run docker from python 3.6.3. The command from the terminal (Ubuntu) works fine, but my python script:</p>
  
  <pre><code>import sys
  import docker
  image = "blang/latex"
  
  client = docker.from_env()
  client.containers.run(image,  '-v /home/data blang/latex pdflatex main.tex', True)
  </code></pre>
  
  <p>returns:</p>
  
  <blockquote>
    <p>APIError: 400 Client Error: Bad Request ("client is newer than server (client API version: 1.30, server API version: 1.24)")</p>
  </blockquote>
  
  <p><strong>docker-machine and docker versions</strong></p>
  
  <pre><code>docker-machine -v
  </code></pre>
  
  <blockquote>
    <p>docker-machine version 0.13.0, build 9ba6da9</p>
  </blockquote>
  
  <pre><code>docker version
  </code></pre>
  
  <blockquote>
    <p>Client:<br>
    Version:      1.12.6<br>
    API version:  1.24<br>
    Go version:   go1.7.4<br>
    Git commit:   78d1802<br>
    Built:        Tue Mar 14 09:47:15 2017<br>
    OS/Arch:      linux/amd64  </p>
    
    <p>Server:<br>
    Version:      1.12.6<br>
    API version:  1.24<br>
    Go version:   go1.7.4<br>
    Git commit:   78d1802<br>
    Built:        Tue Mar 14 09:47:15 2017<br>
    OS/Arch:      linux/amd64</p>
  </blockquote>