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.

1424 questions
48
votes
12 answers

No module named 'gdbm'

I just finished installing python 3.5.1 on my Ubuntu, but am faced with this error message, regardless if I'm installing with Anaconda or with apt-get: No module named 'gdbm' that normally displays on my terminal. I have also tried installing gdbm…
44
votes
5 answers

ImportError: No named '_tkinter', please install the python3-tk package

I am new to Ubuntu and Linux in general. I created a dual boot OS on my laptop (Windows 10 and Ubuntu). Typing: sudo apt-get install python3-tk (or even python-tk) didn't work. Trying to install the python3-dev or python-devel (no…
44
votes
5 answers

Why isn't python 3 the default python binary?

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.
givonz
  • 611
20
votes
2 answers

No module named 'lsb_release' after install Python 3.6.3 from source

platform: ubuntu 17.04 server The ubuntu 17.04 server installation includes python 2.7 and python 3.5. I installed the Python 3.6.3 manually from source. However, lsb_release -a failed: # lsb_release -a Traceback (most recent call last): File…
12
votes
5 answers

Cannot install python venv on Ubuntu 20.04 after upgrading from Bionic

After a system update to Ubuntu 20.04, I've had various issues with python. The current problem is that I cannot create a virtual environment: python3 -m venv env The virtual environment was not created successfully because ensurepip is…
kosmičák
  • 244
  • 1
  • 3
  • 8
12
votes
2 answers

How to uninstall python 3.8 from Ubuntu after deleting the folder Python-3.8.0 using "rm -rf"?

I have a VM with Ubuntu 16.04.6 LTS. It has by default Python 3.5.2 And, I have installed Python 3.8 following the following procedure: wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz tar xzf Python-3.8.0 cd Python-3.8.0 sudo…
Aizzaac
  • 231
12
votes
2 answers

Upgrading Python 3.6 to 3.7 in Ubuntu 18.04 LTS

Since Python 3.7 is already launched, I wanted to ask when will Ubuntu 18.04 will get an update to upgrade the Python3'sversion?
10
votes
4 answers

terminal won't launch after install python 3.5

After I installed Python 3.5 and ran the commands below, my terminal and many other programs won't launch any more. cd /usr/bin sudo rm python3 sudo ln -s python3.5 python3 How can I restore the default Python version again to fix these problems?
Behzad Ghotbifar
  • 123
  • 2
  • 2
  • 7
10
votes
1 answer

Install Python 3 alongside python 2.7 on Ubuntu 18.04

I have Python2.7 and many libraries that I use to run most of my code. However, I'd like to install python3 alongside it so that I can occasionally use it to test out some new code that I have recently obtained. How can I install this to avoid…
8
votes
2 answers

"fatal error: Python.h: No Such File or Directory" when compiling python file to a c executable file?

I am trying to compile c from python. There shows the following errors after I executing the following commands: -Wall -I/usr/include/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5m.a -lpython35 -o prime_numbers_2…
PaulTsai
  • 115
  • 2
  • 6
  • 12
7
votes
1 answer

ubuntu 23.04 python3 no module named ensurepip

I am pulling my hair out over this issue. I am not a python user so following random instructions I find anywhere to solve this issue but nothing works. Basic problem is that I am trying to use ensurepip but it does not exist. $ python3 -m…
6
votes
1 answer

How to Install Python 3.X.X. Properly

I have installed and configured python from online tutorials, python books, and other various sources in the past only to find myself digging through forums when things go wrong and piecing various information together to try and reach my objective.…
Kryptos
  • 203
  • 1
  • 2
  • 7
5
votes
2 answers

How do I install the latest Python version in Ubuntu?

How to update to the latest Python version in Ubuntu? I tried sudo apt-get install python3 but it says that the current (3.3.1) is already the latest.
5
votes
2 answers

12.10 has Python 3.2.3 default, does this impact existing python tools?

Ubuntu 12.10 has Python 3.2.3 default, so does this impact existing python tools, designed to be used with older python 2.x? There was a discussion in HackerNews on the same. I'm a bit apprehensive now to guide someone in python world moving to…
pajju
  • 145
4
votes
1 answer

Why am I not being able to import dateutil module in Python 3?

I'm trying to use the Python 3 version of matplotlib module. I am getting errors about dateutil not being present even though I have installed this package. Shouldn't import dateutil work after installing the above package? I am using Ubuntu…
Codey McCodeface
  • 323
  • 1
  • 3
  • 11
1
2 3 4 5 6