Page 1 of 1

How to install Python 3 on Quirky7 lite?

Posted: Mon Jan 04, 2021 1:16 pm
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


Re: Installing Python 3

Posted: Mon Jan 04, 2021 1:26 pm
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.


Re: Installing Python 3

Posted: Mon Jan 04, 2021 2:49 pm
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... ;-)


Re: Installing Python 3 on Quirky7 lite

Posted: Mon Jan 04, 2021 4:05 pm
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.


Re: Installing Python 3 on Quirky7 lite

Posted: Fri Jan 15, 2021 5:32 pm
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.


Re: Installing Python 3 on Quirky7 lite

Posted: Sat Jan 16, 2021 7:52 am
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?


Re: Installing Python 3 on Quirky7 lite

Posted: Sat Jan 16, 2021 5:10 pm
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.


Re: Installing Python 3 on Quirky7 lite

Posted: Mon Jan 18, 2021 11:29 am
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


Re: Installing Python 3 on Quirky7 lite

Posted: Mon Jan 18, 2021 4:06 pm
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


Re: How to install Python 3 on Quirky7 lite?

Posted: Tue Feb 09, 2021 8:16 pm
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"


Re: How to install Python 3 on Quirky7 lite?

Posted: Wed Feb 10, 2021 12:45 am
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.