13

Is it possible to run python 3.4 on a Raspberry Pi?

Currently I have python 3.2, but the odd thing is that running

sudo apt-get update sudo apt-get install python3 

results in my Raspberry Pi informing me that python3 is 'already the newest version'.

I have also tried sudo apt-get install python34, but this tells me that no such package exists.

Does anyone know how to get python 3.4 running on a Raspberry Pi?

1
  • 1
    It is available on raspbian jessie, just not on wheezy. Commented Dec 4, 2015 at 4:33

3 Answers 3

10

It seems Python 3.4 is still in beta, and there is no package prepared for it yet. If youstill want python 3.4, you should download it and build it from source.

You can find it here: https://www.python.org/downloads/release/python-340/ Download the source tar ball. The build instructions should be in there.

5
  • 1
    Thanks for the help! I am trying it now. The python blog it says that python 3.4 has been released, so how can it still be in beta? Commented Apr 17, 2014 at 9:53
  • Yep, This worked. Thank you! Accepted as the answer. A word of warning to other users: It took a long time to compile - make sure you have a couple of hours to spare before attempting. Commented Apr 17, 2014 at 16:27
  • Great! Good luck! Commented Apr 18, 2014 at 12:03
  • 3
    starbeamrainbowlabs, Python 3.4 (the python language) is released (from the Python Software Foundation) as you say. The Python34 Debian package that corresponds to Python 3.4 is still in beta, however. After the PSF releases a new version of the language, folks on the Debian team still want to vet that version with the rest of the Debian software ecosystem and so the Debian package is still considered "beta". Commented Feb 5, 2015 at 2:19
  • 2
    Well, no longer in beta! Commented Mar 13, 2016 at 2:58
4

I have written a short tutorial on how to achieve this. You can find it here : http://depado.markdownblog.com/2015-03-12-short-tutorial-raspbian-python3-4-rpi-gpio

The above answer is right, you need to compile Python 3.4/3.5 from source and install a few system libs before you do that to have a fully functionnal Python installation. Also you'll need to install the RPi.GPIO from pip if you want to use the GPIO on your Raspberry.

You also need to have some free time to do that because compiling Python can take up to one hour on Raspberry.

Hope that helps even if the question has already been answered.

-2

I used:

conda create -n py3k python=3.4 anaconda 

Provided the following out of the box on my Pi2, many of which are normally a nightmare to get working on python.

package | build ---------------------------|----------------- abstract-rendering-0.5.1 | np19py34_0 68 KB anaconda-2.2.0 | np19py34_0 3 KB argcomplete-0.8.4 | py34_0 29 KB astropy-1.0.1 | np19py34_0 7.2 MB bcolz-0.8.1 | np19py34_0 1.1 MB beautiful-soup-4.3.2 | py34_0 114 KB binstar-0.10.1 | py34_3 74 KB bitarray-0.8.1 | py34_0 90 KB blaze-core-0.7.3 | np19py34_0 313 KB blz-0.6.2 | np19py34_0 1009 KB bokeh-0.8.1 | np19py34_1 13.5 MB boto-2.36.0 | py34_0 1.4 MB certifi-14.05.14 | py34_0 154 KB cffi-0.9.2 | py34_0 186 KB clyent-0.3.4 | py34_0 13 KB colorama-0.3.3 | py34_0 18 KB configobj-5.0.6 | py34_0 51 KB cryptography-0.8 | py34_0 690 KB curl-7.38.0 | 0 495 KB cython-0.22 | py34_0 5.8 MB cytoolz-0.7.2 | py34_0 718 KB datashape-0.4.4 | np19py34_1 99 KB decorator-3.4.0 | py34_0 5 KB docutils-0.12 | py34_0 672 KB dynd-python-0.6.5 | np19py34_0 2.1 MB fastcache-1.0.2 | py34_0 41 KB flask-0.10.1 | py34_1 135 KB fontconfig-2.11.1 | 2 382 KB freetype-2.5.2 | 0 2.4 MB greenlet-0.4.5 | py34_0 35 KB h5py-2.4.0 | np19py34_0 2.6 MB hdf5-1.8.14 | 0 1.5 MB ipython-3.0.0 | py34_0 3.4 MB ipython-notebook-3.0.0 | py34_1 5 KB ipython-qtconsole-3.0.0 | py34_0 4 KB itsdangerous-0.24 | py34_0 16 KB jdcal-1.0 | py34_0 9 KB jedi-0.8.1 | py34_0 176 KB jinja2-2.7.3 | py34_1 351 KB jpeg-8d | 0 663 KB jsonschema-2.4.0 | py34_0 53 KB libdynd-0.6.5 | 0 16.4 MB libffi-3.0.13 | 0 29 KB libpng-1.5.13 | 1 142 KB libsodium-0.4.5 | 0 582 KB libtiff-4.0.2 | 1 836 KB libxml2-2.9.0 | 0 3.7 MB libxslt-1.1.28 | 0 1.0 MB llvmlite-0.2.2 | py34_1 7.5 MB lxml-3.4.2 | py34_0 3.1 MB markupsafe-0.23 | py34_0 31 KB matplotlib-1.4.3 | np19py34_1 44.8 MB mistune-0.5.1 | py34_0 10 KB mock-1.0.1 | py34_0 37 KB multipledispatch-0.4.7 | py34_0 12 KB networkx-1.9.1 | py34_0 977 KB nltk-3.0.2 | np19py34_0 1.6 MB nose-1.3.4 | py34_1 195 KB numba-0.17.0 | np19py34_0 966 KB numexpr-2.3.1 | np19py34_0 330 KB numpy-1.9.2 | py34_0 6.7 MB odo-0.3.1 | np19py34_0 141 KB openpyxl-1.8.5 | py34_0 131 KB openssl-1.0.1k | 1 2.4 MB pandas-0.15.2 | np19py34_1 10.8 MB patsy-0.3.0 | np19py34_0 355 KB pep8-1.6.2 | py34_0 27 KB pillow-2.7.0 | py34_1 744 KB pip-6.0.8 | py34_0 1.6 MB ply-3.4 | py34_0 69 KB psutil-2.2.1 | py34_0 101 KB ptyprocess-0.4 | py34_0 19 KB py-1.4.26 | py34_0 126 KB pyasn1-0.1.7 | py34_0 51 KB pycosat-0.6.1 | py34_0 144 KB pycparser-2.10 | py34_0 148 KB pycrypto-2.6.1 | py34_0 469 KB pycurl-7.19.5.1 | py34_0 106 KB pyflakes-0.8.1 | py34_0 53 KB pygments-2.0.2 | py34_0 1.1 MB pyopenssl-0.14 | py34_0 127 KB pyparsing-2.0.3 | py34_0 66 KB pyqt-4.11.3 | py34_0 3.1 MB pytables-3.1.1 | np19py34_2 3.3 MB pytest-2.6.4 | py34_0 184 KB python-3.4.3 | 0 22.5 MB python-dateutil-2.4.1 | py34_0 219 KB pytz-2015.2 | py34_0 175 KB pyyaml-3.11 | py34_0 348 KB pyzmq-14.5.0 | py34_0 702 KB qt-4.8.6 | 0 35.3 MB readline-6.2 | 2 552 KB requests-2.6.0 | py34_0 622 KB rope-0.9.4 | py34_1 239 KB runipy-0.1.3 | py34_0 9 KB scikit-image-0.11.2 | np19py34_0 23.7 MB scikit-learn-0.15.2 | np19py34_0 7.3 MB scipy-0.15.1 | np19py34_0 31.4 MB setuptools-14.3 | py34_0 440 KB sip-4.16.5 | py34_0 201 KB six-1.9.0 | py34_0 17 KB sockjs-tornado-1.0.1 | py34_0 32 KB sphinx-1.2.3 | py34_0 1015 KB spyder-2.3.4 | py34_1 4.0 MB spyder-app-2.3.4 | py34_0 8 KB sqlalchemy-0.9.9 | py34_0 1.3 MB sqlite-3.8.4.1 | 1 2.5 MB statsmodels-0.6.1 | np19py34_0 5.2 MB sympy-0.7.6 | py34_0 6.5 MB system-5.8 | 2 156 KB terminado-0.5 | py34_0 18 KB tk-8.5.18 | 0 1.8 MB toolz-0.7.1 | py34_0 28 KB tornado-4.1 | py34_0 519 KB ujson-1.33 | py34_0 48 KB util-linux-2.21 | 0 35 KB werkzeug-0.10.1 | py34_0 403 KB xlrd-0.9.3 | py34_0 163 KB xlsxwriter-0.6.7 | py34_0 177 KB xz-5.0.5 | 0 502 KB zeromq-4.0.4 | 0 2.3 MB zlib-1.2.8 | 0 108 KB ------------------------------------------------------------ Total: 312.4 MB 
1
  • You linked to this question? Commented Aug 8, 2015 at 2:26

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.