ERROR: Failed building wheel for pymsgbox - python

Collecting PyAutoGUI
Using cached PyAutoGUI-0.9.53-py3-none-any.whl
Collecting python3-Xlib
Using cached python3_xlib-0.15-py3-none-any.whl
Collecting mouseinfo
Using cached MouseInfo-0.1.3-py3-none-any.whl
Collecting pyscreeze>=0.1.21
Using cached PyScreeze-0.1.28.tar.gz (25 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pygetwindow>=0.0.5
Using cached PyGetWindow-0.0.9-py3-none-any.whl
Collecting pymsgbox
Using cached PyMsgBox-1.0.9.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyTweening>=1.0.1
Using cached pytweening-1.0.4-py3-none-any.whl
Collecting pyrect
Using cached PyRect-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: pyperclip in /usr/lib/python3/dist-packages (from mouseinfo->PyAutoGUI) (1.8.2)
Building wheels for collected packages: pyscreeze, pymsgbox
Building wheel for pyscreeze (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyscreeze (pyproject.toml) did not run successfully.
File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
_inject_headers(name, scheme)
File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
File "/usr/lib/python3.10/_distutils_system_mod.py", line 135, in wrapped_load_schemes
schemes = _load_schemes()
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 103, in _load_schemes
sysconfig_schemes = _load_sysconfig_schemes() or {}
File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 91, in _load_sysconfig_schemes
with contextlib.suppress(AttributeError):
RecursionError: maximum recursion depth exceeded
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pymsgbox
Failed to build pyscreeze pymsgbox
ERROR: Could not build wheels for pyscreeze, pymsgbox, which is required to install pyproject.toml-based projects

I got the same error on my Kali Linux while installing pyautogui. It happens when you have an apt installation pending or when installation fails or some other apt-get error. To fix this just run
sudo apt --fix-broken install
sudo apt-get update
Now try installing pyautogui again...

A quick workaround would be to work on a venv:
python -m venv .venv source .venv/bin/activate pip install ...
which works for me.

python -m venv .venv source .venv/bin/activate pip install....
apt install python3.10-venv

Related

"ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)" shows up trying to install kivy

When I try to install Kivy on Python it all runs fine at first, before the message in the title shows up.
C:\Users\finnj>pip install kivy
Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Collecting setuptools
Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl (3.9 MB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I tried installing "cython" because it helped in some similar problems, however it did not change at all.
My version is 3.11.
you need to install it with command
pip install git+https://github.com/kivy/kivy
i have same with that problem, but i install it from github and its work

ERROR Could not build wheels for ibm_db, which is required to install pyproject.toml-based projects

I am trying to install the python package called IBM_DB.
In VS Code terminal I used command pip install ibm_db to install the package but it did not work.
Here I attach the errors which I encountered. Please anyone help me.
PS CUsersCarlos Toledano
pip install ibm_db
Collecting ibm_db
Using cached ibm_db-3.1.1.tar.gz (1.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages ibm_db
Building wheel for ibm_db (pyproject.toml) ... error
error subprocess-exited-with-error
× Building wheel for ibm_db (pyproject.toml) did not run successfully.
│ exit code 1
╰─ [785 lines of output]
Detected 64-bit Python
I am trying to install IBM_DB in Visual Studio Code terminal.

`pip install` Gives Error on Some Packages

Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well:
pip install chatterbot
Collecting chatterbot
Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting pint>=0.8.1
Downloading Pint-0.19.2.tar.gz (292 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.0/292.0 kB 1.6 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyyaml<5.2,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Preparing metadata (setup.py) ... done
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Collecting setuptools
Using cached setuptools-65.0.1-py3-none-any.whl (1.2 MB)
Collecting wheel<0.33.0,>0.32.0
Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-win_amd64.whl (36 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 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\oguls\AppData\Local\Temp\pip-install-qce7tdof\preshed_546a51fe26c74852ab50db073ad57f1f\setup.py", line 9, in <module>
from distutils import ccompiler, msvccompiler
ImportError: cannot import name 'msvccompiler' from 'distutils' (C:\Users\oguls\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\__init__.py)
[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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I don't specifically know which packages cause this error, a lot of them install without any problems.
I have tried updating pip, changing environment variables and other possible solutions I've found on the internet, but nothing seems to work.
Edit: The package I am trying to install supports my Python version.
The real error in your case is:
ImportError: cannot import name 'msvccompiler' from 'distutils'
It occured because setuptools has broken distutils in version 65.0.0 (and has already fixed it in version 65.0.2). According to your log, the error occured in your global setuptools installation (see the path in error message), so you need to update it with the following command:
pip install -U setuptools
Those packages, however, may still not get installed or not work properly as the module causing this error doesn't support compiler versions needed for currently supported versions of Python.
Same thing happened with me, it was basically pip's version problem.
Try upgrading pip to latest version --22.3.1 and downgrade the python version from latest version --3.10.00 to 3.9.13...
pip --version check for pip's version
pip install notebook --upgrade -command to update pip to latest version
This worked for me

Problems installing certain libraries in python using pip in Spyder

I’ve been running into the same error message with multiple libraries, not all libraries but randomly.
All I could find here and on other equation boards was that I need to upgrade my pip, it’s upgraded to the max (22.1.2) but I still get the same error, no with the added “WARNING: There was an error checking the latest version of pip.”
So this is what I get when I try to install pyinstaller
pip install pyinstaller
Collecting pyinstaller
Using cached pyinstaller-5.1-py3-none-win_amd64.whl (1.2 MB)
Collecting pefile>=2017.8.1
Using cached pefile-2022.5.30.tar.gz (72 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: pywin32-ctypes>=0.2.0 in d:\program files\spyder\pkgs (from pyinstaller) (0.2.0)
Requirement already satisfied: setuptools in d:\program files\spyder\pkgs (from pyinstaller) (61.2.0)
Collecting altgraph
Using cached altgraph-0.17.2-py2.py3-none-any.whl (21 kB)
Collecting pyinstaller-hooks-contrib>=2021.4
Using cached pyinstaller_hooks_contrib-2022.6-py2.py3-none-any.whl (231 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 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\tomer\AppData\Local\Temp\pip-install-01zbu624\future_a521b799a85941e08b0fd94b59c7d89a\setup.py", line 86, in <module>
import src.future
ModuleNotFoundError: No module named 'src'
[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.
WARNING: There was an error checking the latest version of pip.
Thank you for your help

Single pip command to install a tarball or zip as a wheel

I have been unable to find a single pip command to install from a repository (svn, git) or tarball/zip as a wheel. I'm using Python 2.7. For example, Genshi is only available from PyPI as tarball or zip. The package is installed as an egg:
~$virtualenv pve
New python executable in /Users/rjollos/pve/bin/python2.7
Also creating executable in /Users/rjollos/pve/bin/python
Installing setuptools, pip, wheel...done.
~$. pve/bin/activate
(pve) ~$pip install -U pip wheel setuptools
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting wheel
Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting setuptools
Downloading setuptools-34.2.0-py2.py3-none-any.whl (389kB)
100% |████████████████████████████████| 393kB 810kB/s
Collecting packaging>=16.8 (from setuptools)
Using cached packaging-16.8-py2.py3-none-any.whl
Collecting six>=1.6.0 (from setuptools)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools)
Using cached appdirs-1.4.0-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools)
Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Installing collected packages: pip, wheel, six, pyparsing, packaging, appdirs, setuptools
Found existing installation: pip 8.0.2
Uninstalling pip-8.0.2:
Successfully uninstalled pip-8.0.2
Found existing installation: wheel 0.26.0
Uninstalling wheel-0.26.0:
Successfully uninstalled wheel-0.26.0
Found existing installation: setuptools 19.6.2
Uninstalling setuptools-19.6.2:
Successfully uninstalled setuptools-19.6.2
Successfully installed appdirs-1.4.0 packaging-16.8 pip-9.0.1 pyparsing-2.1.10 setuptools-34.2.0 six-1.10.0 wheel-0.29.0
$pip install --no-cache-dir genshi
Collecting genshi
Downloading Genshi-0.7.tar.gz (491kB)
100% |████████████████████████████████| 501kB 1.8MB/s
Installing collected packages: genshi
Running setup.py install for gens
$ls -ld pve/lib/python2.7/site-packages/Genshi*
drwxr-xr-x 9 rjollos staff 306 Feb 16 00:36 pve/lib/python2.7/site-packages/Genshi-0.7-py2.7.egg-info
As a workaround, I can create a wheel and then install the wheel:
(pve) ~$pip wheel --no-cache-dir --wheel-dir wheels genshi
Collecting genshi
Downloading Genshi-0.7.tar.gz (491kB)
100% |████████████████████████████████| 501kB 1.7MB/s
Building wheels for collected packages: genshi
Running setup.py bdist_wheel for genshi ... done
Stored in directory: /Users/rjollos/wheels
Successfully built genshi
(pve) ~$pip install wheels/Genshi-0.7-cp27-cp27m-macosx_10_12_x86_64.whl
Processing ./wheels/Genshi-0.7-cp27-cp27m-macosx_10_12_x86_64.whl
Installing collected packages: Genshi
Successfully installed Genshi-0.7
(pve) ~$ls -ld pve/lib/python2.7/site-packages/Genshi*
drwxr-xr-x 10 rjollos staff 340 Feb 16 00:43 pve/lib/python2.7/site-packages/Genshi-0.7.dist-info
Is there a way to build and install a wheel from a tarball/zip archive in a single pip command? There doesn't appear to be a --wheel option for pip install. There's an --only-binary option, but it will fail if a prebuilt wheel can't be found.

Categories

Resources