Results 1 to 4 of 4

Thread: Python3.6

  1. #1
    Join Date
    Feb 2016
    Beans
    66

    Python3.6

    I am running Ubuntu MATE 18.04 and i'm trying to learn Python3.6 and there is also Python2.7.15. Is it possible to make Python3 the default program that loads first in a terminal instead of Python2?

  2. #2
    Join Date
    Jun 2016
    Beans
    2,831
    Distro
    Xubuntu

    Re: Python3.6

    Just run python3
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

  3. #3
    Join Date
    Jul 2006
    Location
    UK
    Beans
    195
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Python3.6

    Either run your script with python3 instead of python, or add a Python 3 shebang at the top of your script and run it with ./yourscript.py
    Registered Linux User #426227

  4. #4
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    2,021
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Python3.6

    i have added symlinks so i can use shorter names in all users on my laptop:

    Code:
    lrwxrwxrwx 1 root root  16 May 21 23:14 /usr/local/bin/py -> ../../bin/python
    lrwxrwxrwx 1 root root  17 May 21 23:14 /usr/local/bin/py2 -> ../../bin/python2
    lrwxrwxrwx 1 root root  19 May 21 23:14 /usr/local/bin/py2.7 -> ../../bin/python2.7
    lrwxrwxrwx 1 root root  17 May 21 23:14 /usr/local/bin/py3 -> ../../bin/python3
    lrwxrwxrwx 1 root root  19 May 21 23:14 /usr/local/bin/py3.5 -> ../../bin/python3.5
    i am considering making python3 be the default by changing this a bit. maybe you might want to do that. mine have today's date because i have a script that rebuilds everything and i ran it just a few minutes ago.
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •