openairplay / airplay2-receiver

AirPlay 2 Receiver - Python implementation
2.12k stars 131 forks source link

No module named 'Crypto' #90

Closed DuklasW closed 2 months ago

DuklasW commented 4 months ago

The problem

(ap2env) I:\airplay2-receiver-master\airplay2-receiver-master>python ap2-receiver.py -m myap2 -n [INTERFACE_GUID] Traceback (most recent call last): File "I:\airplay2-receiver-master\airplay2-receiver-master\ap2-receiver.py", line 20, in from ap2.playfair import PlayFair, FairPlayAES File "I:\airplay2-receiver-master\airplay2-receiver-master\ap2\playfair.py", line 1, in from Crypto.Cipher import PKCS1_OAEP ModuleNotFoundError: No module named 'Crypto'

What commit exhibits the issue?

python ap2-receiver.py -m myap2 -n [YOUR_INTERFACE_GUID]

Was there a last known working commit?

No response

What type of installation are you running?

virtualenv

With which python3 version do you run Receiver?

Python 3.11.0

OS the receiver runs on

Windows 10

OS the sender runs

IOS 16.7.5

Which sender client was used

No response

Command invocation

(ap2env) I:\airplay2-receiver-master\airplay2-receiver-master>python3 ap2-receiver.py -n en0 --debug Traceback (most recent call last): File "I:\airplay2-receiver-master\airplay2-receiver-master\ap2-receiver.py", line 14, in import netifaces as ni ModuleNotFoundError: No module named 'netifaces' (ap2env) I:\airplay2-receiver-master\airplay2-receiver-master>pip install netifaces Requirement already satisfied: netifaces in i:\airplay2-receiver-master\airplay2-receiver-master\ap2env\lib\site-packages (0.11.0)

Please include --debug output which helps to illustrate the problem

No response

Additional information

No response

systemcrash commented 4 months ago

Has python installed the necessary requirements from requirements.txt

DuklasW commented 4 months ago

Yes, but i have problem with av==8.1.0: "Building wheel for av (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [37 lines of output] running bdist_wheel ... src\av\buffer.c(4785): error C2037: pozosta\x88e z "f_lineno" okre\x98lajĄ niezdefiniowanĄ struktur©/zwiĄzek "_frame" ... error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for av Running setup.py clean for av Failed to build av", I tried to manually install the newer version of av and it worked, but the airplay2-reciver program does not work, then I wrote a notification

systemcrash commented 4 months ago

Which av version did you try (and put in the requirements.txt)?

ScrapyHD commented 4 months ago

I had a similar issue:

`building 'av.buffer' extension creating build\temp.win-amd64-cpython-311\Release\src creating build\temp.win-amd64-cpython-311\Release\src\av ... "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc\av\buffer.c /Fobuild\temp.win-amd64-cpython-311\Release\src\av\buffer.obj buffer.c src\av\buffer.c(4785): error C2037: left of 'f_lineno' specifies undefined struct/union '_frame' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for av Running setup.py clean for av Failed to build av ERROR: Could not build wheels for av, which is required to install pyproject.toml-based projects`

I changed the AV version in requirements.txt to 11.0.0, and it compiled and runs, however, the audio has a lot of static / crackle to it.

Edit / Update: I tried every version of AV since 8.0.0, only versions 10.0.0 and 11.0.0 compile, with 10.0.0 being significantly worse (more static / crackle) than 11.0.0

DuklasW commented 4 months ago

I locked the av module on 11.0.0, cleared the airplay2-receiver-master folder, so I was able to connect the phone(iPhone X, 16.7.6), but the quality of the sound is bad, a lot of distortion and "pyrrr" sound

systemcrash commented 4 months ago

Hmm, doesn't sound like a sound quality issue. Sounds like buffering and playhead problem. It's difficult to get right.

n-WN commented 3 months ago

pip install pycryptodome