Questions tagged [python3]

Python 3 is the latest major version of Python, a scripting language used by many open source developers.

Python 3 is the latest major version of Python, a scripting language used by many open source developers. Python is especially important to Ubuntu - tools like the Software Center, Update Manager, Apport, Ubiquity (Ubuntu's installer), and many more are written in Python.

Many of the Python programs on an Ubuntu system are actually written in Python 2, as there are substantial differences between the two languages and it is not always worthwhile to translate a program from Python 2 to 3. However, new applications and utilities are being written in Python 3, so it is becoming more and more prominent. Eventually Python 2 will be largely phased out.

It is a release goal for Ubuntu 14.04 LTS to have only Python 3 on the desktop CD images.

Python/3 on Ubuntu wiki (see also this blueprint)

For developers, it's probably a good idea to learn Python 3 (and use it for any new programs), though developers who want to work on existing Python 2 projects will need to know Python 2.

More information on Python can be found at the official site, Wikipedia, and Programming/Python in the Ubuntu help wiki.

1474 questions
735
votes
8 answers

How to make 'python' program command execute Python 3?

The python program command executes Python 2. Python 3 can be executed using the python3 command. How can Python 3 be executed using the python command?
Cloud Engineer
  • 7,493
  • 3
  • 14
  • 9
451
votes
9 answers

How do I install Python 3.6 using apt-get?

I've tried the normal way, sudo apt-get install python3.6, but... well... that didn't work. So, how would I go about it? (I'd preferably not build it on my own) I'm using Ubuntu 16.04.
Olian04
  • 4,653
219
votes
19 answers

ModuleNotFoundError: No module named 'distutils.util'

After updating to Ubuntu 20.04, whenever I run: pip install or pip --version it says: adam@daryy:~$ pip3 Traceback (most recent call last): File "/usr/local/bin/pip3", line 5, in from pip._internal.cli.main import…
Rock Life
  • 2,290
126
votes
3 answers

installing pip3 (for python3) on ubuntu 16.04 LTS using a proxy

I have tried entering: sudo apt install python3-pip The error I get is: $ sudo apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be…
Abisdad
  • 1,361
119
votes
10 answers

How to install pip for python 3 in ubuntu 12.04 LTS

I am trying to install the Pillow module for python 3.3, but for that I need to install pip. Every time that I install pip it installs for python 2.7, any help?
BCasaleiro
  • 1,293
116
votes
2 answers

python-is-python3 package in Ubuntu 20.04 - what is it and what does it actually do?

Having used Ubuntu 18.04 for a handful of years now, and reading that Python 2 has been removed from Ubuntu 20.04, I was looking forward to using the commands python or pip rather than python3 or pip3. So today I tried Ubuntu 20.04 for the first…
cdahms
  • 1,993
107
votes
8 answers

How do I install Python 3.3?

I have downloaded Python 3.3 from the official site but no idea how to install it. I'm using Ubuntu 12.04
gonewild
  • 1,081
  • 2
  • 8
  • 3
96
votes
9 answers

How to install Python 3.4 on Ubuntu?

If I open Terminal and type in python, I see the version is 2.7.4. How do I get python 3.4? And do I need IDLE if I have sublime text?
empedokles
  • 4,023
91
votes
19 answers

Problem with update-manager: No module named 'apt_pkg' in Ubuntu 13.10, having installed Python 3.4 on /usr/local/lib

I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu 13.10. I get: jacopo@jacopo-laptop:~$ update-manager Traceback (most recent call last): File "/usr/bin/update-manager", line 28, in from gi.repository import…
user291925
  • 921
  • 1
  • 6
  • 4
70
votes
8 answers

Error: Command '['/path/to/env/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

I just installed python3.7 on my 18.04LTS via the deadsnakes ppa: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.7 -y Now I want to create a virtual environment with python3.7 -m venv env but I get Error: Command…
user2740
  • 1,147
63
votes
8 answers

"Your python3 install is corrupted"

I want to upgrade from Ubuntu 16.04.5 LTS to 18.04, so ran sudo do-release-upgrade. After downloading and extracting bionic.tar.gz I get: Can not upgrade Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink. I saw How to…
60
votes
7 answers

pyvenv-3.4 error: returned non-zero exit status 1

When trying to create a virtual environment using the included pyvenv-3.4 that comes with 14.04, it throws an error: Error: Command '['/some/directories/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status…
Ryan
  • 1,428
53
votes
2 answers

How to install cPickle on Python 3.4?

I tried sudo apt-get install cPickle and python3.4-cPickle but it doesn't work.
vincet
  • 829
52
votes
2 answers

'unsupported locale setting' fault by command-not-found

I recently installed Ubuntu 12.10 by keeping the home folders from Linux Mint 13 distribution. The system installed fine, but at the beginning everything was in Chinese (even the text in the Terminal). I managed to solve that by editing some files,…
Beni Bogosel
  • 1,207
51
votes
2 answers

How to install pip for Python 3.6 on Ubuntu 16.10?

I'd like to start by pointing out that this question may seem like a duplicate, but it isn't. All the questions I saw here on Ask Ubuntu were regarding pip for Python 3 and I'm talking about Python 3.6. The steps used back then don't work for Python…
JChris
  • 993
1
2 3
98 99