title: Can one use python 3.5 in a docker container based out of the TensorFlow docker image?
body: <p>I was trying to use python 3.5 with my docker container. I tried:</p>
  
  <pre><code>gcr.io/tensorflow/tensorflow:latest-devel
  </code></pre>
  
  <p>and </p>
  
  <pre><code>gcr.io/tensorflow/tensorflow:latest-devel-py3
  </code></pre>
  
  <p>but it seems that both images only have python version up to 3.4. Is it possible to have as base image the docker container but also have python 3.5? Or even better, is it possible to have the base image from the official tensorflow image have python 3.5 itself?</p>
  
  <p>I know its possible to pip install it in the Dockerfile as in (as shown in the <a href="https://www.tensorflow.org/get_started/os_setup#pip_installation" rel="nofollow noreferrer">tf download page</a>):</p>
  
  <pre><code>RUN export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp35-cp35m-linux_x86_64.whl
  pip3 install --upgrade $TF_BINARY_URL
  </code></pre>
  
  <p>however that seems that would <strong>not</strong> get me the <strong>latest</strong> tensorflow version. If one can pip install the most recent TensorFlow version why does the latest base image not a way to get the most recent TensorFlow build <strong>and</strong> have it in python3.5?</p>
  
  <hr>
  
  <p>I have definitively tried installing python 3.5 as suggested by <a href="https://askubuntu.com/questions/682869/how-do-i-install-newer-python-versions-using-apt-get">here</a> however, even though the installation of python 3.5 is successful, it breaks numpy in a way I can't fix (as explained <a href="https://stackoverflow.com/questions/42122639/how-does-one-install-fix-a-failed-numpy-installation-that-works-on-python-3-4-bu">here</a>). Honestly, the best solution would be to just have python 3.5 automatically available on the image but for some reason its not there. I have done some research on this and it seems to install python 3.5 its a little difficult. Why is that? Is the reason python 3.5 is missing is because of tensorflow or because of ubuntu? My ideal solution would be to not have me install python 3.5 and that it comes, but it seems there might be a fundamental issue with this. What is it? Is it just because it has not been installed for tensorflow docker image and ubuntu, or am I over complicated a simple problem?</p>
  
  <hr>
  
  <p>as another solution, I was thinking maybe to install anaconda or something and then do that, but I wanted to have tensorflow as my base image and it seems anaconda suggests to have their image as base. Since there isn't an easy way to install anaconda with apt-install I am still working to see how I can programatically install anaconda so that there can be a tensorflow image as base and then install as instructed in a Dockerfile, some version of anaconda.</p>
  
  <hr>
  
  <p>There is now a git issue ine official tensorflow for this:</p>
  
  <p><a href="https://github.com/tensorflow/tensorflow/issues/7368" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/issues/7368</a></p>
  
  <hr>
  
  <p>I mentioned that one can just install TensorFlow in the DockerFile directly so here is an example docker file that worked for me:</p>
  
  <pre><code>RUN apt-get update &amp;&amp; apt-get install -y build-essential git libjpeg-dev
  RUN apt-get install -y vim
  
  # get wget
  RUN apt-get install wget
  
  # install python 3.5
  RUN add-apt-repository -y ppa:fkrull/deadsnakes
  RUN apt-get -y update
  RUN apt-get -y install python3.5
  
  RUN wget https://bootstrap.pypa.io/get-pip.py
  RUN python3.5 get-pip.py
  RUN python3.5 -m pip install -U numpy
  
  #Install some stuff my lib needs
  RUN python3.5 -m pip install -U numpy
  RUN python3.5 -m pip install -U namespaces
  RUN python3.5 -m pip install -U scikit-learn
  RUN python3.5 -m pip install -U scipy
  RUN python3.5 -m pip install -U pdb
  RUN python3.5 -m pip install -U keras
  
  #
  #export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp35-cp35m-linux_x86_64.whl
  RUN python3.5 -m pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp35-cp35m-linux_x86_64.whl
  </code></pre>
  
  <p>I think the only interesting thing to note is that I installed pip directly because that package/intallation of python3.5 doesn't come with pip for it for some reason. That lead to me to install python packages to use:</p>
  
  <pre><code>python3.5 -m pip install
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>pip3
  </code></pre>
  
  <p>you can see more of those details here: <a href="https://stackoverflow.com/questions/42122639/how-does-one-install-fix-a-failed-numpy-installation-that-works-on-python-3-4-bu/42124828#42124828">How does one install/fix a failed numpy installation that works on python 3.4 but not in 3.5?</a></p>
  
  <p>Also note that I had issues installing python the "official way" (i.e. with apt-get or something like that) so I resorted to what the following question/answer suggested: <a href="https://askubuntu.com/questions/682869/how-do-i-install-newer-python-versions-using-apt-get">https://askubuntu.com/questions/682869/how-do-i-install-newer-python-versions-using-apt-get</a></p>