devine-dl / pywidevine

Python implementation of Google's Widevine DRM CDM (Content Decryption Module)
GNU General Public License v3.0
535 stars 118 forks source link

pip install lacks yaml dependency #44

Closed simonbcn closed 11 months ago

simonbcn commented 11 months ago

I tried it on Arch Linux with:

pipx install pywidevine

and on MacOS with:

pip install pywidevine

After installing it, I run pywidevine -h and this is the output:

Traceback (most recent call last):
  File "/opt/homebrew/bin/pywidevine", line 5, in <module>
    from pywidevine.main import main
  File "/opt/homebrew/lib/python3.11/site-packages/pywidevine/main.py", line 9, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
rlaphoenix commented 11 months ago

Not sure how this is the case, since PyYAML is a dependency, as seen here therefore it should be installed. The project name and identifier is PyYAML but it installs a module named yaml.

I cannot personally re-create this issue on my end. If you manually do pip install PyYAML does it solve the issue for you?

simonbcn commented 11 months ago

I created an empty python environment and did the installation. This is the result:

https://github.com/devine-dl/pywidevine/assets/428231/d6c823b4-b836-46c3-a00d-e01e13ffd417

As you can see the PyYAML module is not installed. The recording is made on MacOS but it also happens to me on Arch Linux.

Python 3.11.7 (Linux)
Python 3.11.6 (MacOS)
pip 23.2.1 (Linux)
pip 23.3.2 (MacOS)
rlaphoenix commented 11 months ago

I see. If I look at the dist-info metadata file I do see: Requires-Dist: PyYAML (>=6.0.1,<7.0.0) ; extra == "serve" meaning it will only install if you do pip install pywidevine[serve]. Yet the dependency marker is not marked as optional, I'll remove it from the extras group anyway as that is still likely the cause.