Orange pi zero keeps disconnecting from network while downloading home assistant

I have an orange pi zero and I want to install home assistant to it.

I have followed all the steps from this guide: How to install Home Assistant on an Orange Pi Zero –

I run the command to install the home assistant and after waiting for like 15 minutes, the installation process is stuck almost always at the same place. The lines below show where the process always stops:

Collecting cryptography==36.0.2
Using cached cryptography-36.0.2.tar.gz (572 kB)
Installing build dependencies … -

After not seeing any response I tried to ping the orange pi and I see that it no longer reachable from the initial IP that it was given.

I tried to flashing the sd card again and then trying to install it once more. It just keeps stucking at the place I said above.

I cant understand why this is happening. Any suggestions would be appreciated. Thanks.