I got my Raspberry Pi yesterday and I am already trying to code with it. I have a program that I was planning to run on it but it is only compatible with Python versions 3.5.0 or 3.5.1 and everything I find on the internet seems to either be outdated, to do with Python 2 or doesn't relate to my problem as I haven't seen anything else that 100% requires Python 3.5 and can cope with 3.4(currently pre-installed). .exe files don't work on Linux. I am new to the Raspberry Pi and with Linux as I have always been a Windows user. Any help is appreciated. Many Thanks - Robert
cd ~
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure && make && sudo make install
I would compile it myself (and indeed, have a few times). I'm assuming that you're running Ubuntu or Raspbian. You should be able to install the dependencies:
$ sudo apt-get install build-essential \
libncursesw5-dev \
libreadline5-dev \
libssl-dev \
libgdbm-dev \
libc6-dev \
libsqlite3-dev tk-dev \
libbz2-dev
Then go download the source and extract it, and then install it:
$ tar -xzvf https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
$ cd Python-3.5.1
$ ./configure && make && sudo make install
If you're missing a dependency it will probably die at the ./configure
step. But if everything works, you'll have a brand new Python 3.5 install on your Raspberry Pi. Congrats!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With