Does anyone know how to do this? Debian ships with 3.4 and I need 3.5 to run the website.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can install it from source.
Installing from source have one drawback though. It is being called python3.5 instead of python3. So when you call from terminal python3 it will still open 3.4.2 one. But if you call python3.5 it will open Python 3.5.
Python 3.4.2
Python 3.5.2
python3.5 could be linked (changed) to python3 but it can break system as it’s not know does all Debian packages works with 3.5.
First thing you need to do is to make sure you have C compiler. It’s called gcc and when you type
- gcc --version
you should see something like:
gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you don’t have installed make sure you have build-essential package:
- sudo apt-get install -y build-essential
Now download python3.5 source using cURL.
- curl -O https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
This is link for Linux source of Python3.5.2. It is latest version in time of typing this answer and it can be changed over time, but you can check for latest version on Python Downloads page.
Unpack it after download and go to unpacked directory:
- tar xvf Python-3.5.2.tar.xz
- cd Python-3.5.2
Now, we can compile/install it by running following commands:
- ./configure
- make
- make install
In short lines ./configure will make sure you have all dependencies and create Makefile so it can be compiled. make will compile it and make install will install compiled version of it.
It will take some time to finish (for me it was about 10 minutes).
When you run python3.5 you will see:
- Python 3.5.2 (default, Oct 21 2016, 14:45:38)
- [GCC 4.9.2] on linux
- Type "help", "copyright", "credits" or "license" for more information.
This should be it. If you really want to link python3.5 over python3, we can try to find solution for it, but this is something I would NOT recommend.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.