Linux Mint installation of Python 3.5

Zachary Ware zachary.ware+pylist at gmail.com
Wed Sep 30 05:14:06 CEST 2015


On Tue, Sep 29, 2015 at 10:00 PM, Mario Figueiredo <marfig at gmx.com> wrote:
> On 09/30/2015 03:44 AM, Chris Angelico wrote:
>>
>> The easiest way to install something from source is to use 'make
>> altinstall' for the final step. That should install you a 'python3.5'
>> binary without touching the 'python3' binary. That said, though, it's
>> entirely possible that upgrading 'python3' from 3.4 to 3.5 won't
>> actually break anything; it won't break any script that explicitly
>> looks for python3.4, and there's not a huge amount of breakage. But to
>> be on the safe side, use altinstall and explicitly ask for python3.5
>> any time you want it.
>>
>
> Thank you Chris. That will set me on my path.
>
>> Personally, I use the regular 'make install', but that's because I'm
>> on Debian - the system Python is 2.7.
>
> Unfortunately Ubuntu based distros are going through a 2.x to 3.x
> transition period. Both Pythons are installed and are system dependencies.
>
> And their finicky dependency on Python really make these distros not
> very friendly for Python development. If I do end up successfully
> upgrading from 3.4 to 3.5, I will most likely forfeit my ability to
> upgrade the Mint version in the future without a full system
> installation. So the solution is to just maintain 3 different versions
> of python my machine. Ridiculous.

It should be no problem to just do `./configure && make profile_opt &&
make install`.  The default prefix is /usr/local/; the system python's
prefix is /usr/.  Assuming /usr/local/bin is on your PATH before
/usr/bin, 'python3' from your shell will be python3.5, but all system
scripts should be using /usr/bin/python3 explicitly (if not, it's a
bug; report it to Mint).  Let the system take care of its own 3.4, you
can ignore it and use 3.5.  You won't be able to use apt-get to
install packages for 3.5, but since you're using 3.5.0 less than a
month after release, I assume you want more up-to-date packages anyway
:).  Just use pip for any global packages you want for 3.5, and both
venv and pip for any packages you don't want to be global.

-- 
Zach


More information about the Python-list mailing list