I have both python 2.7 and python 3.7 installed on my system. the issue here is python2 still overrides python3.i mean when trying to install new packages, it still displays the DEPRECATION message. please how do i make python3 my main python version and use it?
if i try 'sudo-apt-update' it always throws back this error message: ModuleNotFoundError: No module named 'apt_pkg'
Please how can i solve all these? i believe its the python2 causing the problem. i am considering to uninstall it. which way forward?
python2
andpython3
installed & working. For most releases,python
should default topython2
but as you haven't given your release, we cannot be specific (python3 -V
reports 3.8.2 for my release, but your release likely should report a 2 release) – guiverc Mar 08 '20 at 11:25Ubuntu 18.04.4 LTS
.python3 -V
reportspython 3.7.5
on the terminal. The issue is,python2
still runs as default. using the commandpython --version
it displaysPython 2.7.16 :: Anaconda, Inc.
– Unique Ezra Mar 08 '20 at 11:43python
command has been removed completely. Usepython2
orpython3
appropriately. – user535733 Mar 08 '20 at 18:13python
command use Py3 instead of Py2?" DON'T DO IT - On 18.04, that will cause breakage. Use the commandpython3
to refer to Py3. – user535733 Mar 10 '20 at 13:26