Python Forum
some errors on my terminal - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: some errors on my terminal (/thread-5164.html)



some errors on my terminal - greed13 - Sep-21-2017

Hello,
i installed python 3.6 on my ubuntu via this guide

everything seems to wor, but i'm still learning python so i didn't use everything yet, but i get some errors on my terminal from the first command i type, here are the errors :

Quote:Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, inapport_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'

can someone explain me how can i fix this ?

Thank you.


RE: some errors on my terminal - snippsat - Sep-21-2017

There can be some problem with this ppa ppa:jonathonf/python-3.6
@barry A. Warsaw answer.
Possible fix

The best and safest way to manage and install version is to use pyenv.
I have a tutorial here 
Example if i want 3.6.2,see it ftp to python.org and not a random ppa.
mint@mint ~ $ pyenv install 3.6.2
Downloading Python-3.6.2.tar.xz...
-> https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz
Installing Python-3.6.2...
Installed Python-3.6.2 to /home/mint/.pyenv/versions/3.6.2

# Make it default version
mint@mint ~ $ pyenv global 3.6.2
# Test
mint@mint ~ $ python
Python 3.6.2 (default, Aug  6 2017, 12:55:04) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>