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

openmin dependency fails,... #1

Open
Selur opened this issue Jan 25, 2025 · 4 comments
Open

openmin dependency fails,... #1

Selur opened this issue Jan 25, 2025 · 4 comments

Comments

@Selur
Copy link

Selur commented Jan 25, 2025

I'm trying to setup vs_deepdeinterlace in a portable Vapoursynth&Python 3.12 environment (here's how I do the setup: setup.md
Problem is that python -m pip install -U openmim
fails:

Collecting openmim
  Downloading openmim-0.3.9-py2.py3-none-any.whl.metadata (16 kB)
Collecting Click (from openmim)
  Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Requirement already satisfied: colorama in c:\users\selur\desktop\vapoursynth\lib\site-packages (from openmim) (0.4.6)
Collecting model-index (from openmim)
  Downloading model_index-0.1.11-py3-none-any.whl.metadata (3.9 kB)
Collecting opendatalab (from openmim)
  Downloading opendatalab-0.0.10-py3-none-any.whl.metadata (6.4 kB)
Collecting pandas (from openmim)
  Using cached pandas-2.2.3-cp312-cp312-win_amd64.whl.metadata (19 kB)
Requirement already satisfied: pip>=19.3 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from openmim) (24.3.1)
Requirement already satisfied: requests in c:\users\selur\desktop\vapoursynth\lib\site-packages (from openmim) (2.32.3)
Requirement already satisfied: rich in c:\users\selur\desktop\vapoursynth\lib\site-packages (from openmim) (13.9.4)
Collecting tabulate (from openmim)
  Downloading tabulate-0.9.0-py3-none-any.whl.metadata (34 kB)
Requirement already satisfied: pyyaml in c:\users\selur\desktop\vapoursynth\lib\site-packages (from model-index->openmim) (6.0.2)
Collecting markdown (from model-index->openmim)
  Downloading Markdown-3.7-py3-none-any.whl.metadata (7.0 kB)
Collecting ordered-set (from model-index->openmim)
  Downloading ordered_set-4.1.0-py3-none-any.whl.metadata (5.3 kB)
Collecting pycryptodome (from opendatalab->openmim)
  Downloading pycryptodome-3.21.0-cp36-abi3-win_amd64.whl.metadata (3.4 kB)
Requirement already satisfied: tqdm in c:\users\selur\desktop\vapoursynth\lib\site-packages (from opendatalab->openmim) (4.67.1)
Collecting openxlab (from opendatalab->openmim)
  Downloading openxlab-0.1.2-py3-none-any.whl.metadata (3.8 kB)
Collecting pywin32 (from opendatalab->openmim)
  Downloading pywin32-308-cp312-cp312-win_amd64.whl.metadata (8.3 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from requests->openmim) (3.4.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from requests->openmim) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from requests->openmim) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from requests->openmim) (2024.12.14)
Requirement already satisfied: numpy>=1.26.0 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from pandas->openmim) (1.26.4)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from pandas->openmim) (2.9.0.post0)
Collecting pytz>=2020.1 (from pandas->openmim)
  Using cached pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas->openmim)
  Downloading tzdata-2025.1-py2.py3-none-any.whl.metadata (1.4 kB)
Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from rich->openmim) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from rich->openmim) (2.19.1)
Requirement already satisfied: mdurl~=0.1 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from markdown-it-py>=2.2.0->rich->openmim) (0.1.2)
Requirement already satisfied: six>=1.5 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from python-dateutil>=2.8.2->pandas->openmim) (1.17.0)
Collecting filelock~=3.14.0 (from openxlab->opendatalab->openmim)
  Downloading filelock-3.14.0-py3-none-any.whl.metadata (2.8 kB)
Collecting oss2~=2.17.0 (from openxlab->opendatalab->openmim)
  Downloading oss2-2.17.0.tar.gz (259 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging~=24.0 in c:\users\selur\desktop\vapoursynth\lib\site-packages (from openxlab->opendatalab->openmim) (24.2)
Collecting pytz>=2020.1 (from pandas->openmim)
  Downloading pytz-2023.4-py2.py3-none-any.whl.metadata (22 kB)
Collecting requests (from openmim)
  Downloading requests-2.28.2-py3-none-any.whl.metadata (4.6 kB)
Collecting rich (from openmim)
  Downloading rich-13.4.2-py3-none-any.whl.metadata (18 kB)
Collecting setuptools~=60.2.0 (from openxlab->opendatalab->openmim)
  Downloading setuptools-60.2.0-py3-none-any.whl.metadata (5.1 kB)
Collecting tqdm (from opendatalab->openmim)
  Downloading tqdm-4.65.2-py3-none-any.whl.metadata (56 kB)
Collecting urllib3<1.27,>=1.21.1 (from requests->openmim)
  Downloading urllib3-1.26.20-py2.py3-none-any.whl.metadata (50 kB)
Collecting crcmod>=1.7 (from oss2~=2.17.0->openxlab->opendatalab->openmim)
  Downloading crcmod-1.7.tar.gz (89 kB)
  Preparing metadata (setup.py) ... done
Collecting aliyun-python-sdk-kms>=2.4.1 (from oss2~=2.17.0->openxlab->opendatalab->openmim)
  Downloading aliyun_python_sdk_kms-2.16.5-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting aliyun-python-sdk-core>=2.13.12 (from oss2~=2.17.0->openxlab->opendatalab->openmim)
  Downloading aliyun-python-sdk-core-2.16.0.tar.gz (449 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Selur\AppData\Local\Temp\pip-install-78oqvi3z\aliyun-python-sdk-core_f0793580944e4425a632f2181ace5b27\setup.py", line 41, in <module>
          VERSION = __import__(PACKAGE).__version__
                    ^^^^^^^^^^^^^^^^^^^
      ModuleNotFoundError: No module named 'aliyunsdkcore'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Any advice how to fix this to install vs_deepdeinterlace?
(There were similar issued with https://github.com/HolyWu/vs-basicvsrpp in the past, but there it was fixed by working around the mmc dependency.)

@pifroggi
Copy link
Owner

pifroggi commented Jan 25, 2025

Hey! Sorry about that, I've run into the same issue recently when trying to install it in a portable vapoursynth/python and couldn't find a workaround so far unfortunately. Openmim and mmcv can be surprisingly tricky to get working if the system is not configured in a very standard way. But at least the DDD and DeF deinterlacers will work without it.

I'll try to look into it again next week. Do you know if there was a workaround when vs-basicvsrpp was still using mmcv?

@Selur
Copy link
Author

Selur commented Jan 25, 2025

I'll try to look into it again next week.

Thanks!

Do you know if there was a workaround when vs-basicvsrpp was still using mmcv?

No really, last time Dan64 helped out by compiled a mmcv version (see: https://forum.selur.net/thread-3726.html).
Looking at what HolyWu did to get rid of the dependency, he basically incorporated the needed code into https://github.com/HolyWu/vs-basicvsrpp (see: HolyWu/vs-basicvsrpp@e8318cf)

@pifroggi
Copy link
Owner

Thanks for the link! Removing the need for mmcv would be the best solution. I can maybe try that in the future with the help of HolyWus's example, but unfortunately don't have that much time to look into it currently.

But for now this solved it for me. There have been two issues:

Mim installation failing due to an issue during aliyunsdkcore installation. I'm not sure why this happens, but it has something to do with using the integrated Python.

  1. Download aliyunsdkcore manually: https://pypi.python.org/packages/source/a/aliyunsdkcore/aliyunsdkcore-1.0.3.tar.gz
  2. Unzip and put folder aliyunsdkcore-1.0.3 into the site-packages folder: vapoursynth-portable\Lib\site-packages\.
  3. It should now be possible to install mim like this: python -m pip install --no-cache-dir U openmim
  4. Update setuptools just in case. In the past it got downgraded during mim installation: python -m pip install -U setuptools

MMCV not installing/building successfully. This is due to using integrated Python, which does not come with developer headers and libraries by default, which are needed to build stuff.

  1. Download attached developer headers and libraries for Python 3.12 manually: Python 3.12 Headers & Libraries.zip
  2. Unzip and put folders include and libs in the same folder where the python.exe is inside your portable Vapoursynth.
  3. Install/update requirements: python -m pip install -U wheel ninja
  4. It should now be possible to install mmcv like this: python -m pip install mmcv

When Vapoursynth switches to a different Python version than 3.12 in the future, the attached files will likely no longer work. But you can get the new ones by installing the required Python version normally via the Windows installer, then going to the installation directory and just copying the libs and include folders from there.

Let me know if that works for you!

@Selur
Copy link
Author

Selur commented Jan 28, 2025

Thanks!
I will give it a try tomorrow and report back.

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

No branches or pull requests

2 participants