0

I had Python 3.6 and Python 3.7 on my system, but I wanted to make the python3 command use Python 3.7 instead. When I changed the symbolic link to point to Python 3.7 I started getting errors saying "ModuleNotFoundError: No module named 'apt_pkg'" in the terminal. I tried reinstalling Python 3.7 and it didn't fix the issue and eventually I just switched the link back to Python 3.6. Now the terminal works fine, but now I'm getting similar errors in actual Python projects using Python 3.7 and even Python 3.8. I'd really like to be able to use one of the newer versions for programming, but I can't figure out how to get apt_pkg installed. It seems like it should be installed with Python, but I've tried reinstalling a few times without luck.

1 Answer 1

0

You should not replace the default version of python. Many packages work with the default version of the system. If you want to work with different versions, you should use a VirtualEnv. If you want to fix the error, revert the changes to the python symbolic link.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .