Page 1 of 1
Python3 installation
Posted: Fri May 28, 2021 11:27 pm
by Bbllaaddee
Hey there, my first question and first puppy!
I'm trying to install python3 to my laptop with bionicpup32.
I downloaded python3.x.x package through ppm, but after the installation, I can't find python3 executable.
What can be the problem? Maybe there's no 32-bit version of python3?
Re: Python3 installation
Posted: Fri May 28, 2021 11:42 pm
by OscarTalks
Type which python3 in terminal and it should tell you where the python3 executable is. Normally /usr/bin/python3 but that will probably be a symlink to an executable with python3xxx (some more numbers on the end). If the symlink is missing you can create it. There is a 32bit version and PPM should have told you if the installation was successful or not.
EDIT:- I just booted into a fresh BionicPup32 and installed python3-3.6.7-1 via PPM to test. The executable symlink for python3 is missing, but python3.6 is there in /usr/bin so just right click on that and select "Link" and name the created link as python3
Re: Python3 installation
Posted: Fri May 28, 2021 11:59 pm
by Bbllaaddee
Well, which python3 gives nothing..
And I searched in /usr/bin/ and there's no python3.8 there.
If I ```ls | grep py``` in /usr/lib gives only those: dh_python2, pydoc, pydoc3.8 pygettext2.7 pygettext3.8 python python2.7 etc.
No actual interpreter there.
I installed it via ppm, package python3.8_3.8.0-3, installation went successful as was said by ppm.
Re: Python3 installation
Posted: Sat May 29, 2021 12:03 am
by OscarTalks
Ah OK, so you installed the later version of python3 in which case the executable will be /usr/bin/python3.8 so just create the python3 symlink as a link to that. If it is not there that is strange, maybe try uninstalling and install the 3.6 package instead.
Re: Python3 installation
Posted: Sat May 29, 2021 12:21 am
by Bbllaaddee
It works!
Thank you!
Installed python3.6 from its package and it works fine.
Although this is really strange, that python3.8 comes with everything but the interpreter....
Should I report it somewhere?
Re: Python3 installation
Posted: Sat May 29, 2021 12:30 am
by OscarTalks
Well I uninstalled the 3.6 and installed the 3.8_3.8.0-3 package instead and /usr/bin/python3.8 is there.
You can use which python3.8 or which python3.6 or whatever of course
Then in terminal with cd /usr/bin followed by ln -s python3.8 python3 to create the symlink or you can do it in ROX-Filer of course.
Re: Python3 installation
Posted: Sat May 29, 2021 2:33 am
by williams2
You could download the source, from, for example, https://www.python.org/ftp/python/3.9.5/
Python-3.9.5.tar.xz is about 18MB
First, backup the save file or save folder.
Load the devx sfs file.
Unzip the tar.xz file in, for example, /tmp/
Code: Select all
cd /tmp/Python-3.9.5/
./configure
make
make altinstall
Or make install
but that will overwrite the Python 2.7 that is already installed.
Code: Select all
# wh python
/usr/bin/dh_python2
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python2.7-config
/usr/bin/python2-config
/usr/bin/python-config
/usr/bin/x86_64-linux-gnu-python2.7-config
/usr/bin/x86_64-linux-gnu-python-config
/usr/local/bin/python3.9
/usr/local/bin/python3.9-config
/usr/sbin/update-python-modules
# python3.9
Python 3.9.5 (default, May 28 2021, 21:30:41)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print
<built-in function print>
>>> print "hello, Puppy!"
File "<stdin>", line 1
print "hello, Puppy!"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("hello, Puppy!")?
>>>
#
It does not make a symlink python3
to /usr/local/bin/python3.9
You can do that manually.