Tiny Core Base > TCB Talk
my adventures with installing python3.9 on TC15
Stefann:
Thanks,
Yes! There are extensions in TC15 But unfortunately not the ones I needed.
Thanks for the example, seems doable, and I really needed that as a guidance otherwise I would never have gotten there.
For your information:
- I’m not familiar with python at all, the only reason I want python is because someone wrote a python coded interface to read cloud-data from my EV-car and I wanted to use that interface
- which got me on a very steep learning curve towards python.
- installing python via tcz mechanism was relatively straightforward, but extending with non tcz modules was an enormous trial & error excersize
- after lot of trying and googling I got where I currently am as described in 1st post. With some spots.. but working. Happy!
- but… as said… I’d don’t like the spots.
So…
Thanks for the example… really helps…
- so far I used pip for extending. That works relatively smooth. But… you cannot run pip as root as it may messup versions. And as a result of that you get a rather ugly install in ~/.local.
- as by your example, proper way to install in /usr/local is by downloading the .gz and installing by setup.py. Thanks for that guidance… it’s totally new for me. It will definitely cost me trial and error to do that but seems doable (And that’s part of the fun).
- creating the .tcz extends after that I should be able to do. I basically already did the same already by creating a data .tcz extension.
I will give it a try!
This will take some days. There is more on my plate.
But I’ll report back how it went.
Thanks!
Stefann:
Hi,
I got time to try.
Some success and some not:
1/ there are more modules in the apps browser than I was aware of! originally I only looked for "python3.9*", I however realised that modules donot necessarily need to be python3.9 specific. Still however... none of the found modules had the version I was looking for.
No problem... try to install using the guidance of Juanito....
2/ I used the method describe by Juanito, YES! worked for many:
I was able to install:
beautifulsoup4, v4.11.1
pytz, v2022.2.1
requests, v2.28.1
paho_mqtt, v1.6.1
==> these went OK!
However got some problems:
A/ beautifulsoup4 wants "soupsieve"
- I downloaded and tried to build but "it does NOT have a setup.py file" --> I'm stuck
B/ python_dateutil, v2.8.2 wants to have "wheel" > ok installed that, but still not working:
--- Code: ---tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ python3.9 setup.py build
/usr/local/bin/python3.9: No module named pip.__main__; 'pip' is a package and cannot be directly executed
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python3.9', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa5_rstqz', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
--- End code ---
It wants to use pip... and actually I doNOT want to use pip because that installs things under ~/.local and that is not what I want.
So... stuck....
any guidance forwards???
Stefann:
OK,...
soupsieve problem I was able to fix >>> I installed an earlier version that DID have the setup.py file
so... now only python_dateutil, v2.8.2 problem.
It wants to be installed by pip
Which I initially did (1st post of this thread)
But than all got in ~/.local which I did not like
And according to what I found on internet I should not use pip as root to avoid that.
not sure how to move form here
Juanito:
As a test I installed/updated various missing packages using "sudo pip3 --blah-blah" and then "python3.9 setup.py build" worked for me with python-dateutil (python-dateutil-2.9.0.post0.tar.gz)
Stefann:
Ok...
I got a little bit further...
--- Code: ---tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ sudo python3.9 -m ensurepip --default-pip
tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ sudo python3.9 -m pip install --upgrade pip
tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ sudo python3.9 -m pip install --upgrade setuptools
tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ python3.9 setup.py build
tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ sudo python3.9 setup.py install --root=/tmp/pkg
tc@hp510:/krubo/work/python/python-dateutil-2.8.2$ cd /tmp
removed __pycache__
tc@hp510:/tmp$sudo mksquashfs pkg/ python3.9-dateutil.tcz
cp python3.9-dateutil.tcz /mnt/sda1/tce/optional
--- End code ---
yess worked
After that I did reboot WITHOUT backup >> to be sure that I did not got any damage form the "sudo python3.9 -m pip" commands
Than I tried to run my application:
> complaining that it did need "six module"
> also made tcz for that
Again tried to run my application:
> complaining that it did need "urllib3 module"
> downloaded and tried to built
> damn... no setup.py script
stuck again.
Anyway... I think I call it a day for today.
t.b.h..... I have the feeling "this is not the way to do it"....
> I'm running into dependancy after dependancy
> the newer models seem to be only properly upgradable by pip.
> In fact "upgrade by pip" actually works and is actually quite simple >>> see 1st post
> but.... "upgrade by pip" ends in ~/.local/lib/python3.9/site_packages folder which is in user space and not OS space which I don't like
> running pip by sudo would solve this BUT has danger that pip upgrades underlying packages that cause broken dependancies elsewhere
So...
I guess the proper way out is to figure out:
- how use pip under sudo
- without danger of breaking things
- and with method to created .tcz from the result
I call it a day for now.
Will pick later if I have some ideas by myself OR from a suggestion here
And very much thank you to Juanito! Little by little you bring me further.
(it of course does not help that I'm an absolute beginner in python and also no big linux hero)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version