Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'vidcutter.libs.mpv' #308

Closed
soufaam opened this issue Apr 26, 2021 · 8 comments
Closed

No module named 'vidcutter.libs.mpv' #308

soufaam opened this issue Apr 26, 2021 · 8 comments

Comments

@soufaam
Copy link

soufaam commented Apr 26, 2021

Hello,
I'm working in Windows 10 environment and I'am trying to compile the source code using Pycharm. When I run main. py file it gives me this error:
import vidcutter.libs.mpv as mpv
ModuleNotFoundError: No module named 'vidcutter.libs.mpv'

Any help will be appreciated

@ozmartian
Copy link
Owner

ozmartian commented May 13, 2021

For Windows 10 you need Python3 and Visual Studio Build Tools 2017 (available for download from Microsoft's Visual Studio pages) and libmpv installed. You can download the libmpv DLL here:

https://sourceforge.net/projects/mpv-player-windows/files/libmpv/

Download the latest version and copy the DLL file into the vidcutter source code directory or, to make it easy, copy it to C:\Windows\System32

Now you can simply run the following command in the vidcutter source code directory:

python setup.py build_ext -i

This will create a .pyd file at vidcutter\libs\mpv.cp39-win_amd64.pyd and you can then PyCharm projects should work too.

@ozmartian
Copy link
Owner

ozmartian commented May 13, 2021 via email

@soufaam
Copy link
Author

soufaam commented May 13, 2021 via email

@Zenahr
Copy link

Zenahr commented Nov 16, 2021

@ozmartian I followed the exact steps but the problem remains.

To reproduce:

Copy D3DCompiler_43.dll to C:\Windows\System32
run python setup.py build_ext -i
run python vidcutter from within the root directory

stacktrace:

(env) C:\SoftwareDevelopment\EasyCut>python setup.py build_ext -i
running build_ext
copying build\lib.win-amd64-3.8\vidcutter\libs\mpv.cp38-win_amd64.pyd -> vidcutter\libs

(env) C:\SoftwareDevelopment\EasyCut>python -m vidcutter
Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\SoftwareDevelopment\EasyCut\vidcutter\__main__.py", line 41, in <module>        
    from vidcutter.videocutter import VideoCutter
  File "C:\SoftwareDevelopment\EasyCut\vidcutter\videocutter.py", line 57, in <module>     
    from vidcutter.libs.mpvwidget import mpvWidget
  File "C:\SoftwareDevelopment\EasyCut\vidcutter\libs\mpvwidget.py", line 63, in <module>  
    import vidcutter.libs.mpv as mpv
ImportError: DLL load failed while importing mpv: The specified module could not be found.

@Zenahr
Copy link

Zenahr commented Nov 16, 2021

This is the folder that is being created when downloading and running the latest version at https://sourceforge.net/projects/mpv-player-windows/files/libmpv/

image

@Zenahr
Copy link

Zenahr commented Nov 16, 2021

@ozmartian fixed!

The correct download link is this: https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20211107-git-ec16769.7z/download

trying to download the latest version doesn't provide the correct dll file.

To make it work I had to put the DLL into System32. Placing it into the source root did not help.

@ozmartian
Copy link
Owner

ozmartian commented Nov 16, 2021 via email

@QiTianzu
Copy link

QiTianzu commented Sep 10, 2024

Download the latest version and copy the DLL file into the vidcutter source code directory vidcutter\libs\ and rename it to mpv-1.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants