Troubleshooting for installation
Introduction
If you could not find your problem in this page, please fire an issue:
Questions and answers
Meet permission denied and import failure during the first run
Question: When I import
mpegCoderfor the first time, why it fails to download something into thesite-pacakgesfolder?Answer: To reduce the size of the
.whlpackage, in the newer release, I decide to not pack the.dll/.sodependencies withmpegCoder. Instead, when importingmpegCoderfor the first time, it will automatically download the dependencies into the package folder. To ensure that you have the permission to fetch the dependencies, I recommend the following to solutions:- The first solution is to install
mpegCoderin a virtual environment where you own the permission. - The second solution is to run
python -c "import mpegCoder"in Administrator mode orsudomode. This command will letmpegCoderstart to download the dependencies.
- The first solution is to install
DLL not found
Question: When importing the module, why meeting the following error?
ImportError: DLL load failed while importing mpegCoder: The specified module could not be found.Answer: It seems that this error will only occurs when both the following conditions are satisfied:
- You are using Windows.
- You are using the maunally installed
mpegCoder, not the pip version.
This error is caused by the absent of required dependencies. It is typically caused when:
- Your python version does not match the
mpegCodermodule. - The required DLL files are neither in the same folder of
mpegCoder.pyd, nor in the path (environment variablePATH).
Fix: Download the dependencies and extract the DLLs in the same folder of
mpegCoder.pyd.
.so not found
Question: When importing the module, why meeting the following error?
ImportError: lib*****.so.**: cannot open shared object file: No such file or directoryAnswer: It seems that this error will only occurs when both the following conditions are satisfied:
- You are using Linux.
- You are using the maunally installed
mpegCoder, not the pip version.
This error is caused by the absent of required dependencies. It is typically caused when:
- Your python version does not match the
mpegCodermodule, in this case, the library name should belibpython3.*.so.**. - The required dependencies files are not in your environment variable
$LD_LIBRARY_PATH.
Fix: Download the dependencies and extract the missing
.soto a folder in$LD_LIBRARY_PATH.
numpy.core.multiarray not found
Question: When importing the module, why meeting the following error?
ImportError: numpy.core.multiarray failed to importAnswer: You may not install Numpy, or your Numpy version is not match the pre-compiled
mpegCoder. In most cases, a little bit mismatch of the Numpy would not cause this error. Maybe your Numpy version is different from the requirement too much. See Compilation list (Win) or Compilation list (Linux) to find the best Numpy version.Fix: Reinstall Numpy, or compile
mpegCoderby yourself.
GLibC 2.29 not found
Question: When importing the module, why meeting the following error?
OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ******/mpegCoder/lib/libsrt.so.1.4)Answer: Your GLibC version is not
>=2.29. To verify that, you could runldd --versionThis problem often occurs when you are using an older Linux OS. The supported OS list could be found here.
Fix: We recommend to compile and install GLibC
>=2.31. However, if users want a faster hotfix. Please follow the follwing instructions.If you are using
mpegCoderfrom pip. You could find a folder namedlib-fixin wherempegCoderis installed, then run the following command:ln -sf <path-of-mpegCoder>/lib-fix/libm-2.31.so /lib/x86_64-linux-gnu/libm.so.6The same file (
libm-2.31.so) could be also found in the Linux dependencies.
GLibC 2.28 not found
Question: When importing the module, why meeting the following error?
OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ******/mpegCoder/lib/librav1e.so.0)Answer: Your GLibC version is not
>=2.28. To verify that, you could runldd --versionThis problem often occurs when you are using an older Linux OS. The supported OS list could be found here.
Fix: To our knowledge, this issue cannot be solved if you do not upgrade to a newer OS release or compile GLibC by yourself. In the next version, we will try to build our toolchain with compiling GLibC first. This change may eliminate this issue in the future release of
mpegCoder.
libcrypyto not found
Question: When importing the module, why meeting the following error?
OSError: libcrypto.so.1.1: cannot open shared object file: No such file or directoryAnswer: This problem is caused by a small mistake in the packaging. This dependency should be, but is actually not bundled with our
mpegCoder. When using a non-conda environment on Ubuntu 22.04, you may meet this problem.Fix: To solve this issue, please upgrade to
mpegCoder>=3.1.1, or install acondaenvironment. If you do not want to do so, you can also useDebian 11orUbuntu 20.04.
Incorrect dependencies
Question: I have not installed any dependencies, and I am not using the PyPI version. Why could I import
mpegCodersuccessfully?Answer: You may have installed FFMpeg before. The FFMpeg libraries are already in your environment. It is danger to work with an incorrect FFMpeg version, because the FFMpeg APIs are keeping changing. Please ensure that your
mpegCoderversion and your FFMpeg version are consistent.Fix: Install
mpegCoderfrom PyPI, or download our dependencies, or compilempegCoderby yourself.
tqdm has no attribute wrapattr
Question: When importing the module, why meeting the following error?
AttributeError: type object 'tqdm' has no attribute 'wrapattr'Answer: This problem only exists from
mpegCoder==3.1.0b0tompegCoder==3.2.3, wheretqdmis an optional package and not listed in the dependencies. However, this optionaltqdmrequires to have the featuretqdm.tqdm.wrapattrwhich was firstly introduced intqdm==4.40.0. In other words, if a user has installedtqdm<4.40.0, this bug will trigger. On the other hand, iftqdmis not installed or with a versiontqdm>=4.40.0, this bug should not happen.Fix: To solve this issue, please upgrade to
mpegCoder>=3.2.4, or run the following command for upgrading yourtqdm:python -m pip install "tqdm>=4.40.0"