However, as noted in the comments, you are still limited to apt-get installing a version of Python in the container based on the Ubuntu release of the container.Īs an alternative, there are official Docker images for each currently supported Python release (as well as the last 2.x release). ![]() Only a few of them technically answer the question's explicitly stated apt-get use-case, but the orthogonal answers are helpful to other readers (like me) as Docker-based answer pointed me in the right direction for my use-case and is greatly appreciated. Some great answers here with alternatives for almost every use-case (install from source, PPA's, pyenv, Docker, Conda). Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. ![]() This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want. For a docker example one can do: docker pull continuumio/anaconda3ĭocker run -i -t continuumio/anaconda3 /bin/bash Note: one can also just install Anaconda. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-p圓) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.Ĭredit: I discovered this when I asked the following: Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. Then for some reason it needed to update some ubuntu stuff so I did (inside the container): apt-get update
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |