Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Sonlis on February 05, 2020, 12:27:40 PM

Title: Impossible to find python pip and setuptools
Post by: Sonlis on February 05, 2020, 12:27:40 PM
Hey everyone,

Discovered Tinycore a few days ago, and I really love it !

I am trying to setup a project and it, but I need pip and setuptools. I couldn't find them, so I searched the internet and this forum and apparently, it should be in python-distribute.tcz, but impossible to find this package from the app browser or tce-load -iw python-distribute. I tried to install everything related to python, but it is still not found. Could you help me locate those tools please ?

Thank you very much !
Title: Re: Impossible to find python pip and setuptools
Post by: Juanito on February 05, 2020, 01:05:29 PM
In the piCore 9.x repo there is a setuptools extension, but there are also the following files in the python extension:

/usr/local/lib/python2.7/ensurepip/_bundled/setuptools-28.8.0-py2.py3-none-any.whl
/usr/local/lib/python2.7/ensurepip/_bundled/pip-9.0.1-py2.py3-none-any.whl
Title: Re: Impossible to find python pip and setuptools
Post by: piCoreUser1 on February 05, 2020, 03:07:47 PM
If you are using piCore-11, where there are no python tool extensions:

Code: [Select]
tce-load -iw python3.8
sudo python3 -m ensurepip
python3 -m pip install setuptools
python3 -m pip install easy_install

If you don't want to create an extension for your python programs then set up a virtual environment:
Code: [Select]
python3 -m venv /mnt/mmcblk0p2/py

Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 08, 2020, 08:40:00 AM
Thank you very much ! How could I miss this directory -.-

I am using python 2, so no uses for python 3, but thanks
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 09, 2020, 01:45:56 PM
So I didn't want to create another topic, as it is still linked to the same project. I need the libatlas libraries, but found on the tinycore extensions repository that it is in "testing" mode. Will it be available in the future ?
Title: Re: Impossible to find python pip and setuptools
Post by: Juanito on February 10, 2020, 02:22:54 AM
Which repo are you speaking of - I don't see libatlas in the piCore 9.x, 10.x or 11.x repos
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 10, 2020, 03:59:54 PM
I forgot to mention, but i'm using piCore 9.x

I found it there, guess I misunderstood something ?  http://distro.ibiblio.org/tinycorelinux/3.x/tcz/ 

I even tried to get it from there: http://tinycorelinux.net/tcz/src/libatlas, but I can't get the tar to extract the archive as I get this :

tar: invalid magic
tar: short read

Title: Re: Impossible to find python pip and setuptools
Post by: Rich on February 10, 2020, 04:09:24 PM
Hi Sonlis
tar: invalid magic
tar: short read
Sounds like a corrupted download, try downloading again. I was able to download and unpack it. To unpack it, run:
Code: [Select]
tar xf atlas3.8.3.tar.xz
Title: Re: Impossible to find python pip and setuptools
Post by: Rich on February 10, 2020, 04:41:30 PM
Hi Sonlis
tar: short read
Is it possible you ran out of storage space?
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 10, 2020, 05:18:21 PM
Hi Rich,

I downloaded it again and run tar with your options and it worked. CPU throttling is enabled however, and I have no idea how to turn it off since the explanation on the atlas do not fit for tiny core.
Title: Re: Impossible to find python pip and setuptools
Post by: Rich on February 10, 2020, 08:24:55 PM
Hi Sonlis
This might be of some interest:
http://math-atlas.sourceforge.net/
The  Software  link takes you to much newer versions of  ATLAS  and the  Install  link leads to a manual.
Title: Re: Impossible to find python pip and setuptools
Post by: Juanito on February 11, 2020, 12:28:53 AM
I found it there, guess I misunderstood something ?  http://distro.ibiblio.org/tinycorelinux/3.x/tcz/ 
That is a link to the repo for version 3.x of the x86 version of tinycore.

You need:

Stable
http://tinycorelinux.net/9.x/armv6/tcz/
http://tinycorelinux.net/9.x/armv7/tcz/

Testing
http://tinycorelinux.net/11.x/armv6/tcz/
http://tinycorelinux.net/11.x/armv7/tcz/
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 11, 2020, 06:20:44 AM
http://math-atlas.sourceforge.net/
The  Software  link takes you to much newer versions of  ATLAS  and the  Install  link leads to a manual.

I tried to follow this already, but I couldn't find how to disable CPU throttling on tiny core. Is there any way to do so ?
Title: Re: Impossible to find python pip and setuptools
Post by: Juanito on February 11, 2020, 06:41:17 AM
You can do so manually by accessing the directory hierarchy under /sys/devices/system/cpu/

Edit: I'm not sure if the cpufrequtils or cpupower cli would be the correct one for the piCore kernel.
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 11, 2020, 09:34:25 AM
I used the cpufrequtils.tcz to toggle it off. However I still have problems with the Atlas installation (with the cachesize search apparently), I'll try to solve it myself. In the meantime, may I ask why some extensions are available on previous releases and not on current ones ? Could I not try to import one from a previous release ? Sorry if my question sounds stupid, I am not very acquainted with OS.

EDIT: this command did the trick for the throttling: cpufreq-set -g performance -c 0, just in case someone wonders.
Title: Re: Impossible to find python pip and setuptools
Post by: Juanito on February 11, 2020, 09:44:29 AM
You can try extensions from previous releases, some will work and some will not..
Title: Re: Impossible to find python pip and setuptools
Post by: Sonlis on February 11, 2020, 11:53:09 AM
Alright, thanks !