Score:0

py3compile:183: cannot create directory /usr/lib/python3/dist-packages/CommandNotFound

il flag

I have deleted my python3 because of multiple symlinks issue, and I'm trying to isntall it again on Ubuntu 20.04, but I'm getting the error:

py3compile:183: cannot create directory 
  /usr/lib/python3/dist-packages/CommandNotFound...

as you can see in the photo blow, the same problem appears while installing any package including python3-commandnotfound, can you please tell me how can I solve that? thanks in advance.

enter image description here

guiverc avatar
cn flag
What command did you try and install with? Were you using `dpkg` and installing `python3-minimal` first?
Bilal avatar
il flag
@guiverc `The following packages have unmet dependencies: python3 : PreDepends: python3-minimal (= 3.8.2-0ubuntu2) but 3.11.2-1 is installed` I can't remove te wrong version of python3-minmal to install the correct one!
guiverc avatar
cn flag
Are you using Ubuntu ? `python3-minimal (3.11.2-1) ` or https://packages.debian.org/sid/python3-minimal is not a Ubuntu package at all. If you provide additional details; please add them to your question (this is a Q&A site & not a forum; comments are to the *Original Poster* or non-OP Commenter). You also didn't provide command as requested (which is actually key with python3 issues!)
Amanda avatar
cn flag
Can you say more about the steps you took to install it? Including both the command you ran and the errors you are seeing will help the community help you.
Score:2
sa flag
  1. Open a text-only virtual console by pressing the keyboard shortcut Ctrl + Alt + F3.

  2. At the login: prompt type your username and press Enter.

  3. At the Password: prompt type your user password and press Enter.

  4. Reinstall the default Python 3 version by running the following commands:

    sudo dpkg --remove --force-remove-reinstreq python3-minimal
    sudo apt install python3-minimal  
    sudo dpkg --remove --force-remove-reinstreq python3-all  
    sudo apt install python3-all  
    sudo reboot  
    
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.