Install on RPiOS 64-bit failes
enorfelt opened this issue · 16 comments
Tried installting cbpi4 on 64-bit OS.
It failed with this: ERROR: Failed building wheel for pandas
I upgraded pandas and numpy to latest versions. Also seams that the dep list is a bit outdated?
You want med to create a PR for the change? Not 100% sure that this is the fix but after it installed and started :)
I want to avoid mixing this with the current branches, as the 64-bit OS is just out for a few days.
As far as I know, only the latest pi's are compatible with 64-bit. The most important thing is that the changes are still compatible with bullseye 32-bit. I am also not sure, if all plugins will work out of the box with the 64-bit OS.
The dep list is still from Manuel and I have not really touched it unless I observed issues with a particular package.
My proposal is, that I create another branch (e.g. 64 bit test) where I can merge a PR.
@enorfelt Are you just talking about the version change of the pandas and numpy package? If so, I can change that w/o new branch. That should not be a problem.
@avollkopf yes! I changed to the latest version in the requirements.txt and setup.py. Don't know if that's only required to update versions? But it seamed to have fixed my issue.
Here's my commit: enorfelt@bee79fb
@enorfelt I have updated the setup.py for the development branch. It'll be merged into the main branch somehwere this week.
I had to revert setup.py back to the initial versions of panda and numpy as other combinations seems to work in the docker cration workflow. However, they were causing issues in a 32 bit raspbian. Only numpy 1.22.0 was wirking with newer pandas version. all other versions of numpy were causeing this error:
valueerror: numpy.ndarray size changed, may indicate binary incompatibility. expected 48 from c header, got 44 from pyobject
However, numpy 1.22.0 is currently not available in the docker environment.
@lalo-uy Yes. I already thought about that, as this is already used for RPi.GPIO.
The question is: what is the output of platform.architecture() on the 64bit system. I assume it is something like ('64-bit',...)
In combination with the other condition that is used for the RPi.GPIO, I could substitute the corresponding packages.
But I also hope, that the docker image can be ported to python3.9 which might solve the issue on the docker side.
can someone start python on the 64 bit raspberry os and run the following commands:
import platform
platform.uname()[1]
platform.architecture()
and post the output
@avollkopf yes can hopefully give it a try tonight. I can also help with the output you requested above.
@lalo-uy Yes. I already thought about that, as this is already used for RPi.GPIO.
The question is: what is the output of platform.architecture() on the 64bit system. I assume it is something like ('64-bit',...) In combination with the other condition that is used for the RPi.GPIO, I could substitute the corresponding packages.
But I also hope, that the docker image can be ported to python3.9 which might solve the issue on the docker side.
can someone start python on the 64 bit raspberry os and run the following commands:
import platform platform.uname()[1] platform.architecture()
and post the output
@avollkopf This was the output:
cbpi
('64bit', 'ELF')
@enorfelt Thank you for the response. The solution won't be working and I just relaized that this is also true for the RPi.GPIO package....
You changed your hostname obviously to cbpi and RPi.GPIO will be only installed if the hostname is raspberrypi. I need to look for a better solution anyhow. But the 64 bit can be identified which is good.
EDIT:
It seems to be more like a pythons related topic
3.7 does not support the newer versions, while 3.9 does. I can also check this with platform
But now I need to prepare my equipment for tomorrow as I need to fill up my fridge.
I have updated the setup.py and the package installation of numpy and pandas is now dependent on the python version.
On my system with python 3.9 it will install the newer versions and on the docker workflow with python3.7 it is installing the older versions. The docker workflow went through.
@papauorg maybe you can confirm that the docker is working with the new setup.py before I merge that into the master branch.
@enorfelt Which version of python are you using on the 64 bit OS?
EDIT:
I made one more change of the setup.py for RPi.GPIO and detection of raspberrypi based system
-> If the system is linux based, it'll check the cpuinfo.
-> If "Raspberry" can be found, falg will be set to install RPi.GPIO
Hi @avollkopf,
But I also hope, that the docker image can be ported to python3.9 which might solve the issue on the docker side.
The docker image currently uses a python 3.7 base image. I think we tried 3.9 when it was created. The problem then was, that there were no prebuilt packages for numpy and/or pandas (I don't remember which one) for the arm64 platform and the build took forever to finish. That's why I reverted to python 3.7. I don't know if this is still the case, though.
We could easily try that by creating a new PR that just updates this line to 3.9 and have a look how the automated build behaves:
https://github.com/avollkopf/craftbeerpi4/blob/4f82dc85b34f3c9258950b710f34224d3bf00c0b/Dockerfile#L6
@papauorg maybe you can confirm that the docker is working with the new setup.py before I merge that into the master branch.
The docker image uses the requirements.txt to install the dependencies and after that installs the RPi.GPIO
package separately. I think it doesn't matter if it matches the conditions that are now in the setup.py
file. Not sure I understood your request correctly.
The responsible lines in the Dockerfile are those:
https://github.com/avollkopf/craftbeerpi4/blob/4f82dc85b34f3c9258950b710f34224d3bf00c0b/Dockerfile#L37-L42
And later it uses the setup.py file, but the RPi.GPIO is already installed here:
https://github.com/avollkopf/craftbeerpi4/blob/4f82dc85b34f3c9258950b710f34224d3bf00c0b/Dockerfile#L46-L47
I just checked out the dev branch and built an image. It runs successfully on my machine (not a raspberry). I currently don't have my raspberry running in my network so I can't test that at the moment.
The docker image uses the requirements.txt to install the dependencies and after that installs the
RPi.GPIO
package separately. I think it doesn't matter if it matches the conditions that are now in thesetup.py
file. Not sure I understood your request correctly.
@papauorg Thank you for the feedback. I tested it with changing just the versions in setup.py and the github workflow failed building an image. With the conditional package versions, the issue is solved. Hence, everythnig should be fine now. I will merge this change into the master.
@avollkopf I'm runing python 3.9.2. Thx for the update! I think it looks good and should work <3