I am trying to install the package python_poppler-qt5, but I've got the following error:
pip install python-poppler-qt5
Collecting python-poppler-qt5
Using cached python-poppler-qt5-21.1.0.tar.gz (28 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmp13hlg21d
cwd: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-install-5gvnukb2/python-poppler-qt5
Complete output (5 lines):
Querying qmake about your Qt installation...
/usr/local/opt/qt/bin/qmake -query
These bindings will be built: Poppler-Qt5.
Generating the Poppler-Qt5 bindings...
_in_process.py: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-build-env-fkuu2mr4/overlay/lib/python3.7/site-packages/PyQt5/bindings/QtCore/QtCore.toml: 'QtCore' was built against ABI v12 but this module is being built against ABI v13
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmp13hlg21d Check the logs for full command output.
So it seems to be a version conflict. Could you help me figure out how to solve this issue?
Installation environment
macOS Catalina v 10.15.4
python v 3.7.6
PyQt5 v 5.15.4
After having unistalled Qt6 and installed Qt5 via homebrew I got the following error:
pip install python-poppler-qt5
Collecting python-poppler-qt5
Using cached python-poppler-qt5-21.1.0.tar.gz (28 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmpnu302c2v
cwd: /private/var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/pip-install-_wyb5s0h/python-poppler-qt5
Complete output (6 lines):
Querying qmake about your Qt installation...
/Users/xizg0003/opt/anaconda3/bin/qmake -query
These bindings will be built: Poppler-Qt5.
Generating the Poppler-Qt5 bindings...
_in_process.py: poppler-form.sip:152: ::Poppler::FormFieldChoice::choicesWithExportValues() unsupported function return type - provide %MethodCode and a C++ signature
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/xizg0003/opt/anaconda3/bin/python /Users/xizg0003/opt/anaconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/57/f7xzdhs15v50pw097zyr8c44mxrzqx/T/tmpnu302c2v Check the logs for full command output.
The first error is caused by using a different version with which PyQt5 was compiled, in this case Qt6 was used but PyQt5 was compiled with Qt 5.15.4.
The second error is caused because the code uploaded to pypi has a bug, in this case the solution is to use the code from the project repository and compile it directly:
pip install PyQt-builder sip
git clone https://github.com/frescobaldi/python-poppler-qt5
cd python-poppler-qt5
sip-build
sip-install
Related
I am writing a program that splits a video into frames and extract the text of every nth frame using opencv-python and pytesseract. I managed to get the code working, but the program was working rather slowly. I tried to use PyPy3 to improve performance but ran into an issue installing the opencv library for pypy.
This is the error code:
Collecting opencv-python
Using cached opencv-python-4.6.0.66.tar.gz (90.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: numpy>=1.14.5 in /usr/local/Cellar/pypy3/7.3.9/libexec/site-packages (from opencv-python) (1.21.6)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml): started
Building wheel for opencv-python (pyproject.toml): finished with status 'error'
Failed to build opencv-python
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
error: subprocess-exited-with-error
× Building wheel for opencv-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Traceback (most recent call last):
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/setuptools_wrap.py", line 613, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/cmaker.py", line 141, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/private/var/folders/55/4bdtvdzn54n8npg5kfybcvq40000gp/T/pip-build-env-_2gw8fsy/overlay/site-packages/skbuild/cmaker.py", line 96, in get_cmake_version
"Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable
Problem with the CMake installation, aborting build. CMake executable is cmake
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
I feel like I tried everything. I successfully installed all other dependencies using
pypy3 -m pip install [package]
Yes, I already upgraded my pip, setuptools and wheels to the latest version.
Any other relevant information:
interpreter path: /usr/local/bin/pypy3
Python version: PyPy 7.3.9 [Python 3.7.13]
OS: MacOS
What I understand is that the error lies with building the wheels and I read something about building the package myself. I couldn't figure it out tho. Any help would be much appreciated.
EDIT:
I installed cmake using brew install cmake. Now when I try to install opencv-python, instead of raising an ERROR, the cmd gets stuck at
Building wheel for opencv-python (pyproject.toml) ... |
The error message states that it may be linked to cmake, You can try to install it. -> https://cmake.org/install/
Completely new to python, running command ‘pip install -U wxPython’ in Command line and this is the error I get:
C:\Users\Pikachu>pip install -U wxPython
Collecting wxPython
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (9.1.0)
Requirement already satisfied: six in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.16.0)
Requirement already satisfied: numpy in c:\users\pikachu\appdata\local\programs\python\python310\lib\site-packages (from wxPython) (1.22.3)
Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.
Installing collected packages: wxPython
Running setup.py install for wxPython ... error
error: subprocess-exited-with-error
× Running setup.py install for wxPython did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:294: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
running build
C:\Users\Pikachu\AppData\Local\Temp\pip-install-2h0mnbul\wxpython_9be5f59f193e4bde8c6b8e211acc73c3\build.py:41: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.dep_util import newer, newer_group
Will build using: "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe"
3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.1.1
Running command: build
Running command: build_wx
Command '"C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe" -c "import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 1740, in return_env
[self.VCIncludes,
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes
return [join(self.si.VCInstallDir, 'Include'),
File "C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Finished command: build_wx (0.228s)
Finished command: build (0.228s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe" -u build.py build
Command '"C:\Users\Pikachu\AppData\Local\Programs\Python\Python310\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxPython
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My installer doesn't see the new "VisualStudio". This helped me. Maybe you too.
Download source:
wxPython-4.1.2a1-cp310-cp310-win_amd64.whl
Install:
pip install _your_path_to_src_\wxPython-4.1.2a1-cp310-cp310-win_amd64.whl
Test:
python -c "import wx; print(wx.version());"
Posible output if everything is correct: 4.1.2a1 msw (phoenix) wxWidgets 3.1.5
More details:
https://gist.github.com/oleksis/8637f096b97e18e00786e46465e97b34
I have tried to do a pip3 install ciso8601 on the Windows command prompt (I have Python 3.10 installed) but I can't help hitting this error message :
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Hugo\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\Hugo\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\Hugo\AppData\Local\Temp\tmpfaqzmm6w'
cwd: C:\Users\Hugo\AppData\Local\Temp\pip-install-z81gigrv\ciso8601_18ea0de24a904fcdaeae094cf83a0854
And a bit further after a few lines of code verbose, there's this :
ERROR: Failed building wheel for ciso8601
Failed to build ciso8601
ERROR: Could not build wheels for ciso8601, which is required to install pyproject.toml-based projects
I've looked for solutions online but I only read things about Visual C++ which version 14 is already installed on my computer.
Platform: Windows 10 Pro 20H2, Python 3.8.7
I need to install image-match module, but when install is coming to required scikit-image module, i am recieving error:
Running setup.py install for scikit-image ... error
ERROR: Command errored out with exit status 1:
WARNING: The wheel package is not available.
Surfing Internet i found out that scikit-image module wheel for windows is not available. I tried to install scikit-image with binary .whl file. Looks like module installed and i tried to install image-match again. Now i am recieving this:
Building wheel for image-match (setup.py) ... done
Created wheel for image-match: filename=image_match-1.1.2-py3-none-any.whl size=21230 sha256=bb2a55e18dac36ab10056523f66383756fac637eafe4f12d4e12df9a3da3ad8c
Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\70\62\40\3511b893ee0655b25176450c3b0405caf4ded0f44927de3ebe
Building wheel for scikit-image (setup.py) ... error
ERROR: Command errored out with exit status 1:
Partial import of skimage during the build process.
I am not that good in Python, so what am i doing wrong?
Install directly from Github Link for some reason PyPI has an older version of the branch.
Use this Command pip install git+https://github.com/EdjoLabs/image-match
I am trying to install darknetpy using these instructions:
https://pypi.org/project/darknetpy/
however every time I run 'pip install darknetpy' I get:
$ pip install darknetpy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting darknetpy
Using cached darknetpy-4.1.tar.gz (9.4 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\paddy\appdata\local\temp\tmp9kl8jm'
cwd: c:\users\paddy\appdata\local\temp\pip-install-eqp5it\darknetpy
Complete output (2 lines):
c:\python27\python.exe: No module named pip
Please install setuptools-rust package
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\paddy\appdata\local\temp\tmp9kl8jm' Check the logs for full command output.
I have installed setuptools-rust but still get the same errors as above.
I am on a Windows 10 laptop and using Git Bash as my emulator. Please help!
Use the following command to install darknetpy successfully:
pip install https://github.com/danielgatis/darknetpy/raw/master/dist/darknetpy-4.2-cp37-cp37m-linux_x86_64.whl