0

I am very new to Ubuntu and I'm running a Linode server using Ubuntu 22. I have added the Python files that I have intended on running on the server, here is the dilemma though.

I have a module named PQCrypto that not only needs Python 3.7.0 specifically to work, but it also needs to be installed manually, as installation via pip, conda or any other alternate method will render installation impossible. I would like to move my Python folder (the one containing the .exe for Python 3.7.0 and all of my downloaded packages) into Ubuntu so it can run my code.

So what I would like to know is the following...

  • How do I remove the current Python on Ubuntu installed by default? (Python Version 3.10.4)
  • How do I move my Python folder into Ubuntu so when I run my file on the server again, it has the correct version installed, and all of the packages
    pre-installed?
  • Why are you wanting to use .exe in a Ubuntu Server? – Nicolas Formichella Apr 27 '22 at 14:18
  • 1
    Python is part of the Ubuntu OS. If you remove it, Ubuntu will stop working. You will have a broken system. Nothing will work. – user68186 Apr 27 '22 at 14:18
  • @user68186 Then how do I downgrade it then and achieve my goal? – Naisukhy Apr 27 '22 at 14:30
  • @NicolasFormichella Well, I just want to downgrade Python and get PQCrypto installed. What do you suggest to achieve this? – Naisukhy Apr 27 '22 at 14:31
  • Linux will not run .exe (well, it can, but not in your case) but Linux executables, I suggest you have a look at pyenv or at Docker containers – Nicolas Formichella Apr 27 '22 at 14:35
  • Downgrading the default python in Ubuntu will break Ubuntu. You can have install multiple versions of python for different purposes. You should learn how to use virtual environments for different versions of python. – user68186 Apr 27 '22 at 14:40
  • @user68186 Well I already installed the version I wanted but it's still running Python 3.10, how do I fix this? I know what venv's are but don't know how to navigate Ubuntu. – Naisukhy Apr 27 '22 at 14:50
  • @NicolasFormichella Can you elaborate please? – Naisukhy Apr 27 '22 at 14:52
  • Are you asking about a Ubuntu Core 22 server? ie. you have no apt command, and are restricted to using only snap packages. Ubuntu products using the year format are snap only, unlike the year.month format (ie. 22 != 22.04) – guiverc Apr 27 '22 at 22:46
  • @guiverc Yes, I have a server – Naisukhy Apr 27 '22 at 22:56
  • So it's a Ubuntu Core 22 server? which is a different system to Ubuntu 22.04 LTS server? You mention 22 & server, so you're not using 22.04 Server ? – guiverc Apr 27 '22 at 22:59
  • @guiverc Yes, the server is on Linode. I don't know if it's an LTS one or not. – Naisukhy Apr 27 '22 at 23:01
  • Being precise on your Ubuntu product is essential for accurate advice; however if you remove the default python3 from your system, you'll lose access to all Ubuntu tools that rely on it; and those same tools maybe unreliable or not function if a different python3 version is put there instead (ie. you may corrupt your system without realizing it). Removing the default python (python3) is not advisable unless you know exactly what you're doing & can deal with all consequences (avoid all system tools that rely use python) – guiverc Apr 27 '22 at 23:04

0 Answers0