Pip get's by default old Python version


When I’m trying to run my django api it auto start with an old python version of 2.7. I need to install a new python version as root and use the hooks like this: python3.8 -m pip.

Can I add it as default like on my other servers?

The only issue is now that I get a permission issue…

Hi @tombaboon,

Are you installing via a deployment hook? Deployment hooks typically run as the assigned server user; you might SSH into server and install new Python version there.

Yes I installed new version in the server. Can I set is as default to? I had a permission issue but set it manually with ssh

Does updating the command from pip to pip3 work?

Yes but need 3.8 and that’s 3.6

This error do I have every time now…

I removed python 3.8 and try to install as cleavr user but doesn’t work…

Managing python versions does seem quite a bit tricky, especially comparing to node. The first answer here seems like it may be helpful: How do I install pip for python 3.8 on Ubuntu without changing any defaults? - Stack Overflow

Yes, but I can’t remove it I always get this error:
Screenshot 2022-07-07 at 17.38.44

Ah! some broken package is preventing uninstallation - looks like that post installation script didnt run, or broke or something.

I wonder if there is a way to re-run the post installation script.

That, or try apt remove --purge python3.8 and see if that removes 3.8, then try installing again.

Nope, it doesn’t work getting same error again…

With really good help from @anish it is fixed! We removed the previous installed version and install it again with the cleavr user. Normal install didn’t work but with this it worked perfect!

Thanks @anish and @amiedema

How to Install Python 3.8 on Ubuntu, Debian and LinuxMint – TecAdmin