default python versions
John W. O'Brien
john at saltant.com
Tue Feb 21 01:24:07 UTC 2017
On 2/20/17 10:48, tech-lists wrote:
> Hello,
>
> system: freebsd11-stable r312829 / ports: 434441
>
> How can I set (or is it desirable to set) the default python version to
> python3? Isn't 2.7 ancient?
>
> I have the following installed:
>
> root at hp:/usr/ports/lang/python3 # python --version
> Python 2.7.13
> root at hp:/usr/ports/lang/python3 # python3 --version
> Python 3.5.3
>
> In /etc/make.conf, I have:
>
> DEFAULT_VERSIONS+= ssl=libressl =python=python3
> *I don't know if this is correct ^^^^^^^^^^^^^^^^*
>
> I've googled but a lot of what's there seems outdated/contradictory
Hi J.,
Yes, 2.7 is ancient. However, lots of software still assumes that
python2 is the only python that exists. Your relative success using
python3 as the default version will depend on what other software you
require. Speaking for myself, I still build with 2.7 as the default and
then install whatever I need for 3.x from a non-default build with
PYTHON_VERSION=python3.x and run it explicitly. I hope others will chime
in with their experiences.
Incidentally, an excellent source of up-to-date information is in the
comments of the files in /usr/ports/Mk. An excerpt from
bsd.default-version.mk:
====
# Possible values: 2.7, 3.3, 3.4, 3.5, 3.6
PYTHON_DEFAULT?= 2.7
# Possible values: 2.7
PYTHON2_DEFAULT?= 2.7
# Possible values: 3.3, 3.4, 3.5, 3.6
PYTHON3_DEFAULT?= 3.5
====
It sounds like you may want
DEFAULT_VERSIONS+= ssl=libressl python=3.5
Note that you will have to rebuild/reinstall for this change to take effect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-python/attachments/20170220/881bc4a8/attachment.sig>
More information about the freebsd-python
mailing list