Set up the PrivateGPT AI tool

I was reading the weekly itsfoss newsletter this morning and found the article on PrivateGPT fascinating.

However, I was unable to get it set up correctly. Following the steps given, I ran into the following issues:


python3 -m pip install pip 

/usr/bin/python3: No module named pip

Also no module name  apt_pkg

Even after reinstalling python3-apt with flags  fix-missing and  fix-broken

LM was unable to locate python3.11-apt

so was unable to continue on Linux Mint 21.3.

Why would I get these errors?

Sheila Flanagan

On an Ubuntu or Debian related distro you would sudo apt install pip. Then you could run the python3 -m pip install --upgrade pip to make sure you have the latest pip. Finally use pip to install poetry. But maybe you should use python3 -m pip install poetry.

It depends on which version of python is in use. It can get kind of convoluted. The default on the computer should not be messed with. Typically, you want to use virtual environments for each project. I think that’s what they are trying to do with poetry, but I have not used poetry.

I think the instructions for installing pip were incorrect.

1 Like

Pip , and therefore Python, belong to the class of software items which subvert the package system by installing things
outside of it.
There is a growing list of these rebels , including languages such as R , Julia, and Rust…
It would seem some languages have a problem using the package system. The older languages, C, C++, Fortran do not do it… it is the newer, fast developing languages that seem to want to create their own package system, when there is a perfectly reasonable and well tested one already available.

Re-inventing the wheel is not usually a useful activity.

I was just interested in trying out the Private GPT feature from the newletter.


It does seem that the command could be troublesome.

So, please use this command instead:

sudo apt install python3-pip

I just want to add here that following the steps in the article caused me all kinds of issues. I was not aware of them until I rebooted.

Eventually had to get recovery mode, repair broken packages, which all output errors pointed to python 3.11. Luckily, I was able to update, remove the ppa & packages without reinstalling python completely and got my working system back.

Just an FYI.


That’s what I meant by saying the default Python installation should really be left alone. I don’t remember for sure but I think they said the article was written with Python 3.11 in mind. The default was probably more like Python 3.9.

It is tricky to work with Python where there are multiple versions required and virtual environments used. I can’t say I’m an expert. I’m just aware of the variables.

1 Like

@pdecker it was 3.10. Not just Linux Mint but apps that also use it had errors. I’m still trying to get one resolved.


Things like this almost make we want to do all my messing inside a VM. That way I can revert changes or start from scratch more easily. No easy answers I guess.

That is exactly what I will do from here on. I mean, I have a Fedora VM already, but it did not occur to me to use it. And adding a LM vm is far simpler than cleaning up the mess.


1 Like

I think you can delete the “almost”

Alway use a VM or a separate hard install, or dven a separate machine, for experiments, not your main workhorse.

Nothing new - Perl have been doing this for 30+ years with CPAN…