How to install Python 3 on Quirky7 lite?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
schober
Posts: 20
Joined: Wed Oct 28, 2020 8:32 pm

How to install Python 3 on Quirky7 lite?

Post by schober »

AFAICS there are 2 possibilities

1) Install Miniconda followed by a few additional packages using the conda tool. They don't list any dependencies.

https://docs.conda.io/projects/conda/en ... linux.html

2) Install Activestate python followed by any additional packages using pip. However it needs Glibc 2.3 (& gcc4 forNumpy)

https://docs.activestate.com/activepyth ... get/linux/

(PPM lists python2.7, I want python3)

Quirky7 only has glibc2.2 (&no gcc)

So it looks like miniconda is the way to go. Any suggestions or comments?

Both put everythong in one folder.
Would it be best to put the folder on the hd, outside the savefile?

PS
Using laptop i3 2.1 mhz and 4gb
The os. is on dvd and the savefile on hdd. The hdd still has windows7.
Im using april64-7.0.1F-uefi - the lightweight version of quirky7

Last edited by schober on Mon Jan 04, 2021 3:28 pm, edited 1 time in total.
User avatar
rockedge
Site Admin
Posts: 6354
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2541 times
Been thanked: 2514 times
Contact:

Re: Installing Python 3

Post by rockedge »

I use ActiveState's python 3 packages. I use python for object / face detection and recognition. Along side ZoneMinder is the zmeventnotification server that provides the object detection. Also opencv is a big player and I use the python bindings for that. ZMES is written in PERL and PYTHON.
I have python 2.7 and python 3.8 running side by side. I have switches and controllers for X10 systems that I wrote for 2.7 and have not ported them to 3.XX yet. These turn lights on and off around the house and do wireless motion detection with X10 IR motion sensors.

I sometimes place the ActiveState python in /opt, but in most cases I place the python3 directory outside of the OS's filesystem.

There are some symlinks that I add to integrate the ActiveState python into the Puppy Linux's $PATH. I add the path to python3 in /etc/profile to adjust the environment variables.

User avatar
wiak
Posts: 4013
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 60 times
Been thanked: 1165 times
Contact:

Re: Installing Python 3

Post by wiak »

rockedge wrote: Mon Jan 04, 2021 1:26 pm

These turn lights on and off around the house and do wireless motion detection with X10 IR motion sensors.

I'd be scared to visit your house rockedge. It sounds too intelligent and I hope you don't have any guns firing if it recognises my face like alone shining a light on it... ;-)

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 6354
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2541 times
Been thanked: 2514 times
Contact:

Re: Installing Python 3 on Quirky7 lite

Post by rockedge »

All the cameras really don't "look" at anything with security in mind and my goal has been to detect mice and individually identify my cats by face recognition. I've been trying to get my basement camera to detect and identify a mouse in IR night vision since the basement is pitch black most of the time, for months now.

X10 is "ancient" technology making all the components dirt cheap which goes right along with the dumpster and free on the roadside computers I use to run this stuff.

Come to think of it I have some really high tech efficient and effective camera security systems running for no real reason at all other than it's a fun hobby and to see if I can do it as well as the "pros".

Like running an OS with a Zoneminder system from a USB stick, a portable personal network camera security system on an 8 gig flash drive that also is a lean and mean network video recorder, complete from operating system to all the needed servers all on the stick. But who would use such a beast and is it at all practical? Probably very few and no, not really.

schober
Posts: 20
Joined: Wed Oct 28, 2020 8:32 pm

Re: Installing Python 3 on Quirky7 lite

Post by schober »

Did you manage to intall AS python using glibc 2.2? AS say that it needs glibc 2.3. AFAIAA there isnt a glibc2.3 available for puppy.

User avatar
greengeek
Posts: 1354
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 495 times
Been thanked: 184 times

Re: Installing Python 3 on Quirky7 lite

Post by greengeek »

rockedge wrote: Mon Jan 04, 2021 4:05 pm

Like running an OS with a Zoneminder system from a USB stick, a portable personal network camera security system on an 8 gig flash drive that also is a lean and mean network video recorder, complete from operating system to all the needed servers all on the stick. But who would use such a beast and is it at all practical? Probably very few and no, not really.

Sounds perfect for keeping an eye on what the pets are doing round the home during the day. And keeping an eye on the driveway.
Do you have it all packaged up as an iso?

User avatar
rockedge
Site Admin
Posts: 6354
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2541 times
Been thanked: 2514 times
Contact:

Re: Installing Python 3 on Quirky7 lite

Post by rockedge »

I only have really outdated versions packaged up as a complete system with Zoneminder. I should make a newer version. I'll check whether to use Bionic or Fossa.

schober
Posts: 20
Joined: Wed Oct 28, 2020 8:32 pm

Re: Installing Python 3 on Quirky7 lite

Post by schober »

IMHO the AS site is a bit of a mess!
Eventually came across this
https://docs.activestate.com/activepyth ... get/linux/
Which implies glibc2.17 is needed!
Anyway, followed the tarball recipe and did everything on sda3, the windows 7 partition.
The tarball is ~500mb and took ages to unzip. 2gb of disc space isnt enough to unzip it. It then took 25mins to install.
Ran this script
export PATH=/mnt/sda3/ActivePython-3.8/bin:/mnt/sda3/ActivePython-3.8/Tools:/mnt/sda3/ActivePython-3.8/Tools/ninja:$PATH
Typing python3 in console gives the python prompt

After installation there was this

"You may need to set the environment variables:
OPENSSLDIR, SSL_CERT_DIR, and SSL_CERT_FILE so that your
system can locate the default OpenSSL certificate directory.
These are our expected values for your system:

export OPENSSLDIR=/etc/ssl
export SSL_CERT_DIR=/etc/ssl/certs"



Should I run these two lines as well?
Typing python3 in the console gives the python prompt and I have run a few simple scripts

Thanks Rockedge for your interest

User avatar
rockedge
Site Admin
Posts: 6354
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2541 times
Been thanked: 2514 times
Contact:

Re: Installing Python 3 on Quirky7 lite

Post by rockedge »

I would say yes run those lines and check /etc/profile and adjust the PATH to add the location of the ActiveState python you're working with to the environment variable

schober
Posts: 20
Joined: Wed Oct 28, 2020 8:32 pm

Re: How to install Python 3 on Quirky7 lite?

Post by schober »

export OPENSSLDIR=/etc/ssl
export SSL_CERT_DIR=/etc/ssl/certs"

These have to be run before starting python in order to access data on websites. However their effect is not permanent.

Where should i place the lines?

OPENSSLDIR=/etc/ssl
SSL_CERT_DIR=/etc/ssl/certs"

williams2
Posts: 1058
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: How to install Python 3 on Quirky7 lite?

Post by williams2 »

You can put in /etc/profile.local

Code: Select all

export OPENSSLDIR=/etc/ssl
export SSL_CERT_DIR=/etc/ssl/certs

or in /etc/profile, but /etc/profile is more likely to be overwritten by an update.

Or in /root/.profile or /root/.bashrc but /etc/profile.local is probably better.

Post Reply

Return to “Beginners Help”