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

How to install on Windows 10? #56

Closed
FieryRMS opened this issue Jun 18, 2022 · 1 comment
Closed

How to install on Windows 10? #56

FieryRMS opened this issue Jun 18, 2022 · 1 comment

Comments

@FieryRMS
Copy link

Hi, I have been trying to install this for the past few days and have been going crazy. Here is my progress so far.

Environment

Qt Installation

Qt was installed using chocolatey
choco install qt5-default

SIP Installation

sip was installed by compiling sip-4.19.25.zip from the RiverBank site.

cd sip-4.19.25
python configure.py
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
nmake
nmake install

pkg-config Installation

pkg-config was installed using chocolatey
choco install pkgconfiglite

Current package versions

qmake --version
QMake version 3.1
Using Qt version 5.15.2 in C:/Qt/5.15.2/mingw81_64/lib

sip -V
4.19.25

pkg-config --version
0.28

sip-build -V
6.6.1

python -V
Python 3.10.2

Python libraries

Here are the installed python libraries (of course I am not listing all of them, just the relevant ones)

pip==22.1.2
PyQt-builder==1.13.0
PyQt5==5.15.6
PyQt5-Qt5==5.15.2
PyQt5-sip==12.10.1
setuptools==62.4.0
sip==6.6.1
wheel==0.37.1

Qt5 Poppler

The Qt5 poppler binaries for windows were downloaded from SourceForge poppler-qt5 for mingw32 and extracting the content to C:/ and creating a new file in C:/poppler called poppler-qt5.pc with the following contents. C:/poppler was then added to my environment PKG_CONFIG_PATH variable.

prefix=C:/poppler
libdir=C:/poppler/lib
includedir=C:/poppler/include

Name: poppler-qt5
Description: PDF rendering library
Version: 0.32.0

Libs: -L${libdir} -llibpoppler-qt5
Cflags: -I${includedir}/poppler/qt5 -I${includedir}/poppler

Errors

I cloned the repo to my computer using git and opened a terminal in that directory.

sip-build

sip-build --verbose
Querying qmake about your Qt installation...
C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -query
sip-build: '12.11' is not a supported ABI version

pip install .

pip install .
Processing c:\python-poppler-qt5
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5478 lines of output]
      Querying qmake about your Qt installation...
      These bindings will be built: Poppler-Qt5.
      Generating the Poppler-Qt5 bindings...
      Generating the .pro file for the popplerqt5 module...
      Generating the top-level .pro file...
      Generating the Makefiles...
      Compiling the project...
      _in_process.py: 'make' could not be found on PATH
      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 619, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmp9l8gih7s'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 820, in onerror
          _os.unlink(path)
      PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmp9l8gih7s'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 619, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmp9l8gih7s'

      During handling of the above exception, another exception occurred:

...
...
repeats for a while
...
...

During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 619, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmp9l8gih7s'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 820, in onerror
          _os.unlink(path)
      PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmp9l8gih7s'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\weakref.py", line 667, in _exitfunc
          f()
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\weakref.py", line 591, in __call__
          return info.func(*info.args, **(info.kwargs or {}))
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 836, in _cleanup
          cls._rmtree(name, ignore_errors=ignore_errors)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 832, in _rmtree
          _shutil.rmtree(name, onerror=onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 739, in rmtree
          return _rmtree_unsafe(path, onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 621, in _rmtree_unsafe
          onerror(os.rmdir, path, sys.exc_info())
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 823, in onerror
          cls._rmtree(path, ignore_errors=ignore_errors)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 832, in _rmtree
          _shutil.rmtree(name, onerror=onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 739, in rmtree
          return _rmtree_unsafe(path, onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 621, in _rmtree_unsafe

...
...
repeats for a while
...
...

File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 823, in onerror
          cls._rmtree(path, ignore_errors=ignore_errors)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tempfile.py", line 832, in _rmtree
          _shutil.rmtree(name, onerror=onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 739, in rmtree
          return _rmtree_unsafe(path, onerror)
        File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 619, in _rmtree_unsafe
          os.rmdir(path)
      RecursionError: maximum recursion depth exceeded while calling a Python object
      [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.

setup.py build/build_ext

I tried hard with this method, but I deleted all my progress after losing hope. Basically the issue was the program not being able to find a bunch of files such as QtCore/QtCoremod.sip etc, and source files which I downloaded from the net. I do not want to do this all again unless I have to. The current output is as follows.

setup.py build
C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:772: UserWarning: Usage of dash-separated 'force-manifest' will not be supported in future versions. Please use the underscore name 'force_manifest' instead
  warnings.warn(
running build
running build_ext
building 'popplerqt5' extension
C:\Users\User\AppData\Local\Programs\Python\Python310\sip.exe -I C:\Users\User\AppData\Local\Programs\Python\Python310\sip -t POPPLER_V0_31_0 -c build\temp.win-amd64-cpython-310\Release -b build\temp.win-amd64-cpython-310\Release\poppler-qt5.sbf -I C:\Users\User\AppData\Local\Programs\Python\Python310\sip\PyQt5 -n PyQt5.sip -t Qt_5_15_0 -t WS_WIN poppler-qt5.sip
sip: Unable to find file "QtCore/QtCoremod.sip"
error: command 'C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python310\\sip.exe' failed with exit code 1
@jeanas
Copy link
Member

jeanas commented Aug 9, 2023

@FieryRMS Hi, sorry that you did not receive a reply until now (NB I was not involved in this project in 2022). You seem to have been using a sip version incompatible with the one that was used to build PyQt5. I will close this issue, as it is not directly a problem with this project, but feel free to ask for more help (and see #42 about ongoing efforts to prevent users from having to build python-poppler-qt5 from source).

@jeanas jeanas closed this as completed Aug 9, 2023
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