Page MenuHomePhabricator

Please upgrade python on the newest version on cloud vps
Closed, InvalidPublic

Description

Current is:

zoranzoki21@tools-bastion-03:~/pywikibot-core$ python --version
Python 2.7.6
zoranzoki21@tools-bastion-03:~/pywikibot-core$

Event Timeline

Kizule renamed this task from Upgrade python on the newest version on cloud vps to Please upgrade python on the newest version on cloud vps.Dec 13 2017, 8:33 PM
Kizule updated the task description. (Show Details)
• chasemp subscribed.

I think it's possible you mean on Toolforge itself since that is the Toolforge bastion rather than all of VPS. It's unclear what you intend as the 'newest' version of Python, as such it's unclear if you should use /usr/bin/python3 as your interpreter.

I think it's possible you mean on Toolforge itself since that is the Toolforge bastion rather than all of VPS. It's unclear what you intend as the 'newest' version of Python, as such it's unclear if you should use /usr/bin/python3 as your interpreter.

Ok

{{ec}}
If you want Python 3:

08:36:32 0 ✓ zhuyifei1999@tools-bastion-05: ~$ python3 --version
Python 3.4.3

If you want even newer versions of python 2/3 provided by debian jessie, use kubernetes:

tools.zhuyifei1999-test@tools-bastion-05:~$ webservice --backend kubernetes python2 shell
[...]
tools.zhuyifei1999-test@interactive:~$ python2 --version
Python 2.7.9
[...]
tools.zhuyifei1999-test@tools-bastion-05:~$ webservice --backend kubernetes python shell
[...]
tools.zhuyifei1999-test@interactive:~$ python3 --version
Python 3.4.2

Python is installed via apt from ubuntu/debian's official repo:

08:52:35 0 ✓ zhuyifei1999@tools-bastion-05: ~$ apt-cache policy python
python:
  Installed: 2.7.5-5ubuntu3
  Candidate: 2.7.5-5ubuntu3
  Version table:
 *** 2.7.5-5ubuntu3 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

If we want to install globally a newer version than provided by the official repositories, by policy a package will have to be self-built, and, unless there are super good reasons to do so, that's a huge cost in maintainability.

If you just need a newer version for your own use, you are free to download and compile locally for your tool (in which case you are free to ask in case you encounter problems), or use tools like pyenv to simplify this process.

{{ec}}
If you want Python 3:

08:36:32 0 ✓ zhuyifei1999@tools-bastion-05: ~$ python3 --version
Python 3.4.3

If you want even newer versions of python 2/3 provided by debian jessie, use kubernetes:

tools.zhuyifei1999-test@tools-bastion-05:~$ webservice --backend kubernetes python2 shell
[...]
tools.zhuyifei1999-test@interactive:~$ python2 --version
Python 2.7.9
[...]
tools.zhuyifei1999-test@tools-bastion-05:~$ webservice --backend kubernetes python shell
[...]
tools.zhuyifei1999-test@interactive:~$ python3 --version
Python 3.4.2

Python is installed via apt from ubuntu/debian's official repo:

08:52:35 0 ✓ zhuyifei1999@tools-bastion-05: ~$ apt-cache policy python
python:
  Installed: 2.7.5-5ubuntu3
  Candidate: 2.7.5-5ubuntu3
  Version table:
 *** 2.7.5-5ubuntu3 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

If we want to install globally a newer version than provided by the official repositories, by policy a package will have to be self-built, and, unless there are super good reasons to do so, that's a huge cost in maintainability.

If you just need a newer version for your own use, you are free to download and compile locally for your tool (in which case you are free to ask in case you encounter problems), or use tools like pyenv to simplify this process.

Thank you! I will use command python3

@Zoranzoki21: Please do strip unneeded quotes, to keep tasks readable.

This comment was removed by bd808.