0

Ubuntu 22.04 (like all other previous versions), comes out with Python already installed by default, in fact if I open the Terminal and type:

cris@cris:~$ python3 -V
Python 3.10.6

So, Phyton is there !!

My question and problem arises when I try to install by script a Console SDK that i need to build applications.

If I start the installation of the SDK by a script.sh, in the Terminal it gives me this error:

Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source.
However the following packages replace it:
2to3 python2-minimal:i386 python2:i386 python2-minimal python2 dh-python python-is-python3

In fact in the script it is referred to as

python

and not as

python3

so, my question is but python and python3 is not the same function/environment?

Or, because the script does look for python and as python is not installed since it calls phyton3 in the system?

I'm really confused here....

Niewbie
  • 121
  • 1
    Ubuntu has always included python. You shouldn't attempt to change the python interpreter either. If you need a specific version of python for a task, use some kind of container or otherwise isolate it from your system – Nmath Oct 03 '22 at 03:59
  • @Nmath, so you would like to say that anyway would be better to create a separate environment for the projects that I'm going to do instead of using or referring to the one included into the OS, right? – Niewbie Oct 03 '22 at 04:03
  • Absolutely. If you change the python interpreter on your system, it's likely to break things – Nmath Oct 03 '22 at 04:06

1 Answers1

0

Ok, I solved, I changed the name into the script.sh from python to python3 and the script installation works perfectly.

I took the solution inspiration , from the error that it say to install the package python-is-python3; I get informed about that package and it will create a symlink to point between the two python spells; as Ubuntu with all python packages use explicit python3 or python2 interpreter.

But even if I installed it, that should solve this little problem code spells; in my case and in the end it doesn't but I changed manually the sript.sh to let it find the right python (python3) name.

Who is interest can check something similar here: python-is-python3 package in Ubuntu 20.04 - what is it and what does it actually do?

Now, I'm more clear about the Default Python Environment.

Niewbie
  • 121