Python3-Wheels icon indicating copy to clipboard operation
Python3-Wheels copied to clipboard

Building from source for RPi 4 Bullseye using Python 3.9

Open swm35 opened this issue 2 years ago • 14 comments

Good afternoon

I have been trying to follow your very helpful instructions to build from source for a 64-bit RPi 4 Bullseye OS using Python 3.9 and aarch64. I keep getting this error on the item 6 command "python3 setup.py sdist bdist_wheel" at the bdist_wheel stage though:

"error: [Errno 2] No such file or directory: 'build/CMakeCache.txt'".

Do you know how to resolve this by any chance? Looking through the code suggests that file should have been made some point earlier in the process.

Any thoughts greatly appreciated as Torchaudio in particular is not working using simple pip install methods.

Kind regards

Simon

swm35 avatar Mar 08 '23 18:03 swm35

I would be glad to help you. Which version do you want to build?

Fire-Cube avatar Mar 08 '23 18:03 Fire-Cube

That would be brilliant, thank you. I am looking to run diart and pyannote.audio on the RPi, so I need to install these versions: pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0

Let me know if I have misunderstood your query.

swm35 avatar Mar 08 '23 19:03 swm35

I think I'll try to compile wheels again.

torchsmoke avatar Mar 09 '23 08:03 torchsmoke

Hi @Fire-Cube and @torchsmoke

Please could I check how this is going? Are there any particular difficulties with the versions I listed? Am very much looking forward to getting this working.

Kind regards

Simon

swm1718 avatar Mar 15 '23 21:03 swm1718

@swm1718 It seems that the newer PyTorch versions have problems with the gcc compiler. I can try again tomorrow to find a solution. Me and torchsmoke are the same by the way.

Fire-Cube avatar Mar 15 '23 21:03 Fire-Cube

Noted, thank you. It would be great if you could get it working.

swm1718 avatar Mar 15 '23 21:03 swm1718

@swm1718 It seems that the Raspberry compiler has a bug. Which is why the PyTorch compilation aborts. I'm currently building a new gcc.

Fire-Cube avatar Mar 16 '23 20:03 Fire-Cube

That's interesting to know, thank you. Is that RPi compiler bug specific to these later versions of Python/PyTorch? It sounds as though you didn't encounter that bug with your previous wheels.

swm1718 avatar Mar 18 '23 00:03 swm1718

@swm1718 The later PyTorch versions use things that are not possible with the pre-installed GCC version due to a bug.

Fire-Cube avatar Mar 18 '23 18:03 Fire-Cube

Hi @Fire-Cube - How is the gcc building going?

swm1718 avatar Mar 28 '23 21:03 swm1718

@swm1718 The gcc build is finished. The compilation of PyTorch now does not work because of another error. I don't know yet what the problem is. Tomorrow I can try again.

Fire-Cube avatar Mar 28 '23 22:03 Fire-Cube

Hi @Fire-Cube - Did you manage to find out what the PyTorch compilation error was by any chance?

swm35 avatar Apr 06 '23 09:04 swm35

Hi @Fire-Cube - Just checking in to see how things are going here. Did you have any luck resolving the PyTorch compilation error?

swm1718 avatar Apr 27 '23 11:04 swm1718

No sadly not.

Fire-Cube avatar Apr 27 '23 11:04 Fire-Cube