I am not very experienced at Linux but I recently installed Ubuntu 19.10 and I am trying to use Python 3 and the default is Python 2. I spent a lot of time reading how to configure Ubuntu to run Python 3 but I felt to do it.  Can anyone please help me? I used these commands but nothing works...  sudo update-alternatives --list python sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7
88741
According to official documentation of Python, Python2.7 support will end near in future.     DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at    Why is Ubuntu not using Python3 as default in their upcoming version?  $ cat /etc/os-release  NAME="Ubuntu" VERSION="19.04 (Disco Dingo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.04" VERSION_ID="19.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=disco UBUNTU_CODENAME=disco     $ python Python 2.7.16 (default, Apr  6 2019, 01:42:57)  [GCC 8.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.
42248
I just installed a linux system (Kubuntu) and was wondering if there is a program to make python programs executable for linux.
101069
I hope you can help me. I installed Ubuntu 18.04 a few days ago and, while trying to configure it and installing new packaged and software, I think I did something bad. I think it could be related with installing python. Anyway, netiher the gnome-terminal or gnome-tweaks can´t start anymores. Also, when I try to update (sudo apt-get update) it gives me the following error:  sh 1: /usr/lib/cnf-update-db: not found Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db &gt; /dev/null; fi' E: Sub-process returned an error code   I am relativeley new to Linux so I have no clue how can I fix this. Any idea? Even to restore defult configurations/settings?  Thank you very much!
116285
I understand that in Ubuntu 14.04, you have access to both python 2.7.6 and python 3.4.0. When getting python packages through the command line, how do I make sure that I am installing packages meant for python 2.7.6 and not for python 3.4.0?
3544
I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.
31179
I am using Sublime Text 3 in Ubuntu. The default Python is python2 which Sublime uses when I build program using Ctrl+B. I am trying to run code as, print(f&quot;Player {row[0]} Vertically =&quot;)  but it gives error as follows because code is run with default Python File &quot;/home/gd/Desktop/python/python-revision/pp_13_iterators_iterables.py&quot;, line 41   print(f&quot;Player {row[0]} Vertically =&quot;)                                       ^ SyntaxError: invalid syntax [Finished in 0.0s with exit code 1] [shell_cmd: python -u &quot;/home/gd/Desktop/python/python-revision/pp_13_iterators_iterables.py&quot;] [dir: /home/gd/Desktop/python/python-revision]  However, when I run same program from terminal, using python3 it works as expected. $ python3 pp_13_iterators_iterables.py [1, 2, 1] [2, 0, 1] [1, 2, 1] Vertically Player 1 Vertically =  How can I change default build environment of Sublime Text to Python 3 and build it using shortcut as Ctrl+B? I tried using alias as alias python=&quot;/usr/bin/python3.6&quot;  but it didn't work and gave same error as previous.
109255
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon.  Some questions to get us going in the right direction:   Will you have a python 2 and python 3 version to be maintained concurrently or will you simply have a python 3 version once it's finished?   Have you already started or plan on starting soon?  Or do you plan on waiting until the final version comes out to get into full swing?
53519
I have 14.04. I read on the pip readthedocs that pip is included by default with Python 3. When I installed Python 3 on Windows it was there, but I'm getting pip command not found on Ubuntu. I checked dpkg and it is not there. I also looked at the Ubuntu Python 3 port page and did not see anything. If pip is here, where do I find it and get it working? If it is not here, why and what else is missing from the default Python 3 that I should know about so I don't waste time looking for it?
38745
I have installed both OpenJDK 6 and 7. When I run "java somefile" from the command line, OpenJDK 6 is invoked. I do not want to change this default behavior. What command can I use to run my non-default OpenJDK 7 installation instead?  (I am used to running "python somefile" to invoke the default Python, "python2.7 somefile" to use Python 2.7 specifically and "python3 somefile" to use Python 3 specifically.)
102439
I want the very latest version of Python, but I don't want to bypass the apt package manager: I don't want to do an old-school source install because that can make it harder to uninstall when the official packages come out.  Python3.5 is not currently featured in any of Canonical's package repositories, which means I cannot just "apt-get install python3.5".  Is there a way to get Python3.5 installed on my PC in the meantime?
75692
I'm new to Linux but not to app development. I come from a RealBasic on a Mac background.   I've accepted that I need to learn a new language to develop for Linux (since RB won't run on 64 bit distros and is a cloed proprietary language) but I want to make sure I pick the right one.   I've been looking at Python and was all set to go until I read that PyGTK is becoming obsolete with the introduction of GTK 3. Is this true? The Ubuntu developer website stills seems to recommend it with Glade for the UI but I want to make sure that I don't learn something that's on the way out!
114486
I need to start learning Python, and I want to learn with version 3.x. I understand that QGIS--at least some plug-ins--relies on Python and Tcl/Tk, and probably on specific versions. Assuming that QGIS is dependent on Python 2, can anyone tell me how to set up parallel installations of Python 3 and Tcl/Tk such that QGIS will have what it needs and I can use Python 3 for other purposes?
2887
Trying to get casperjs running on Ubuntu 12.04. After installing it when I run I get:   09:20 $ ll /usr/local/bin/casperjs lrwxrwxrwx 1 root root 26 Nov  6 16:49 /usr/local/bin/casperjs -&gt; /opt/casperjs/bin/casperjs  09:20 $ /usr/bin/env python --version Python 2.7.3  09:20 $ cat /opt/casperjs/bin/casperjs | head -4  #!/usr/bin/env python  import os import sys  09:20 $ casperjs : No such file or directory  09: 22 $ python Python 2.7.3 (default, Sep 26 2013, 20:03:06)  [GCC 4.6.3] on linux2   So Python is present and runnable, casperjs is pointing to the right place and it is a python script. But when I run it I get "No such file".   I can fix it by changing the first line of the casperjs python file from:    #!/usr/bin/env python   to:   #!/usr/bin/python   Result:   $ casperjs --version 1.1.0-DEV   I managed to fix it, but I'm wondering why it didn't work with #!/usr/bin/env python, since that seems to be a normal interpreter line. Do I have something configured wrong?   Here are the steps to get casperjs:   $ git clone git://github.com/n1k0/casperjs.git $ cd casperjs $ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs $ casperjs : No such file or directory
12284
Trying to learn how to run my scripts through Ubuntu's terminal regularly.  That being said I am familiar with bash, wget, and awk being called but how do I call python files to run in the terminal?  I would like to learn this but I am unsure on where to research it.  I have a .pyw file that references several .py files in a folder.
39101
I have several systems. Some are 16.04 mini-servers and I cannot update the OS yet. The others have been updated to Ubuntu 18.04. (The 18.04 version I used has Python 3.6.5 on it).
8979
I type python in a terminal window. I get Python 2.7 and not Python 3.5. According to the docs, Python 3.5 should come preloaded.
102518
Yes, I'm a moron, and I tried to manually install a higher point release of python 2.7.16 to /usr/bin/  (i did ./configure --prefix=/usr) on my Ubuntu 16.04 machine. It seems to work fine EXCEPT for packages that depended on python, like apt-listchanges, which fails with messages like ImportError: No module named apt_pkg  there's no make uninstall available, I've tried manually removing files, and still when I try apt --reinstall install python, Nothing gets overwritten and the python executable still gives the new 2.7.16 version...   Any idea how to get the official repository version back??