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

Can't install on windows #2875

Closed
ggonmar opened this issue Sep 1, 2023 · 6 comments
Closed

Can't install on windows #2875

ggonmar opened this issue Sep 1, 2023 · 6 comments
Labels

Comments

@ggonmar
Copy link

ggonmar commented Sep 1, 2023

When attempting to install calibre using the recommended method, pip install calibreweb as per the documentation, I get the following error:

Using cached MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl (17 kB)
Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Building wheels for collected packages: netifaces
  Building wheel for netifaces (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for netifaces (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      C:\Users\ggonm\AppData\Local\Temp\pip-build-env-5vhcds4f\overlay\Lib\site-packages\setuptools\config\setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!

              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.

              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running bdist_wheel
      running build
      running build_ext
      building 'netifaces' 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.
  ERROR: Failed building wheel for netifaces
Failed to build netifaces
ERROR: Could not build wheels for netifaces, which is required to install pyproject.toml-based projects

Python version I am using is 3.11, and I am on windows 10.

@OzzieIsaacs
Copy link
Collaborator

Please try this one: #2759
(Temporary downgrade of python version)

@ggonmar
Copy link
Author

ggonmar commented Sep 15, 2023

Python 3.9 did the trick indeed - working for now! thanks!

Should I close this ticket as there is a workaround?

@OzzieIsaacs
Copy link
Collaborator

Please leave it open, I will write a faq entry and maybe something else

@9ao9ai9ar
Copy link

I was able to install Calibre-Web in a Python 3.11.5 conda environment by using the Visual Studio Installer to install

  1. MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
  2. Windows 10 SDK (10.0.20348.0)

@bengalih
Copy link

I concur for proper install on Windows 11 (and likely Win10 and possibly Win Server versions):
* In my case I'm on Win 11 with python 3.11.4 installed.

I download the Build Tools with the VS Installer from here:
https://visualstudio.microsoft.com/visual-cpp-build-tools/

During the setup, click the "Individual Components" and install the two components listed in @9ao9ai9ar comments above.
In on Windows 11 you can install the latest Win 11 SDK shown instead.

Then the pip install calibreweb should function.

Make sure you are installing into a venv (virtual environment) as suggested. It is possible not to do this, but much less headache if you do. If you still have issues you might want to try to wipe out/recreate your venv and then clear the pip cache with pip cache purge before reinstall.

For users not as familiar with a venv refer to the manual instructions here:
https://github.com/janeczku/calibre-web/wiki/Manual-installation
(don't rely on these verbatim for Windows)

and the python venv instructions here:
https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/

If you install the MS packages as listed and create the venv you shouldn't have any issue.

@djcampbell
Copy link

@9ao9ai9ar Life saver!

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

No branches or pull requests

5 participants