C0D3D3V / Moodle-DL

Moodle-DL downloads course content fast from Moodle (eg. lecture pdfs)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation Error - libxml2 and lxml - Windows

amaanansari opened this issue · comments

The following errors occurs when installing via pip on windows:

Building wheels for collected packages: multidict
Building wheel for multidict (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for multidict (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [59 lines of output]
*********************
* Accelerated build *
*********************
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\multidict
copying multidict_abc.py -> build\lib.win-amd64-cpython-311\multidict
copying multidict_compat.py -> build\lib.win-amd64-cpython-311\multidict
copying multidict_multidict_base.py -> build\lib.win-amd64-cpython-311\multidict
copying multidict_multidict_py.py -> build\lib.win-amd64-cpython-311\multidict
copying multidict_init_.py -> build\lib.win-amd64-cpython-311\multidict
running egg_info
writing multidict.egg-info\PKG-INFO
writing dependency_links to multidict.egg-info\dependency_links.txt
writing top-level names to multidict.egg-info\top_level.txt
reading manifest file 'multidict.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict_multidict.html'
warning: no previously-included files found matching 'multidict*.so'
warning: no previously-included files found matching 'multidict*.pyd'
warning: no previously-included files found matching 'multidict*.pyd'
no previously-included directories found matching 'docs_build'
adding license file 'LICENSE'
writing manifest file 'multidict.egg-info\SOURCES.txt'
C:\Users\Amaan\AppData\Local\Temp\pip-build-env-eg4jlew1\overlay\Lib\site-packages\setuptools\command\build_py.py:202: SetuptoolsDeprecationWarning: Installing 'multidict._multilib' as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'multidict._multilib' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'multidict._multilib' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).

      Please make sure that 'multidict._multilib' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" and "data files" on setuptools
      documentation page.


  !!

    check.warn(importable)
  copying multidict\__init__.pyi -> build\lib.win-amd64-cpython-311\multidict
  copying multidict\py.typed -> build\lib.win-amd64-cpython-311\multidict
  running build_ext
  building 'multidict._multidict' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

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

I did not even know that multidict is a dependency of one of our dependencies.
But I guess you just have to follow the last instruction line...

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Just install the tools from microsoft... you can download it from the link mentioned in the error.

I solved the problem. Installation on windows by the way

I installed the C++ build tools. They are quite heavy (6GB), but it worked . Afterwards I got an error while installing lxml.

Error solved by manually downloading the wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
In my case the following wheel worked: lxml‑4.9.0‑cp311‑cp311‑win_amd64.whl

@C0D3D3V thanks for your help :)

Mh, sorry I did not know that it is 6GB, If I would have known I could have linked you to a smaller version that only is like a few mb, that only contains Microsoft Visual C++ 14.0 Redistrubution Packages. Like this
https://aka.ms/vs/17/release/vc_redist.x64.exe
or
https://aka.ms/highdpimfc2013x64enu

Also there exists some tools that can install these specific packages very efficient and with low file size.

I'm very sorry!!! I also will have a look why this is even a dependency at all, maybe there is a way to get around it.