I run below command on ubuntu 16.4 :
sudo add-apt-repository ppa:noobslab/apps
of below question:
How to install PlayOnLinux on Ubuntu 16.04
and get below error:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Thanks for help
python3-software-properties
package. It provides the missing module. – user535733 Aug 26 '18 at 12:59sudo apt install --reinstall <package name>
– user535733 Aug 26 '18 at 13:02sudo apt install --reinstall python3-software-properties
but Still the problem persists – Mostafa Norzade Aug 26 '18 at 13:07sudo apt-get install --reinstall python-apt python3-apt
. – N0rbert Aug 26 '18 at 14:11which python
andwhich python3
to the question. – N0rbert Aug 26 '18 at 16:15which python : /usr/bin/python
.which python3 : /usr/bin/python3
– Mostafa Norzade Aug 26 '18 at 16:56