error: legacy-install-failure - unable to install mysqlclient on Windows - python

I am unable to install mysqlclient via pip. I am working on Windows 11 and using python-3.9.13 and pip 22.1.2 and installed MySQL 8.0.29
Below is the installation output and error snip. Could you please look into this?
Thank you in advance
(myenv) D:\New_Folder\github\project\projectName>pip install mysqlclient==1.3.14
Collecting mysqlclient==1.3.14
Using cached mysqlclient-1.3.14.tar.gz (91 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for mysqlclient, since package 'wheel' is not installed.
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
error: subprocess-exited-with-error
× Running setup.py install for mysqlclient did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
D:\New_Folder\github\myenv\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the underscore name 'distribution_name' instead
warnings.warn(
D:\New_Folder\github\myenv\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
warnings.warn(
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying _mysql_exceptions.py -> build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.9\MySQLdb
X86\\x64\\cl.exe' failed with exit code 2
[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.
╰─> mysqlclient
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Related

Error in build the wheel when installing the Python package?

I am trying to install psqlparse package on my system, but it is giving me wheel build error.
I tried these methods to install and they all give the same error.
*#1 use pip*
pip install psqlparse==1.0rc7
*#2 use pip*
pip install -U psqlparse==1.0rc7
*#3 use setup.py*
python setup.py install
Error:
Collecting psqlparse==1.0rc7
Using cached psqlparse-1.0rc7.tar.gz (1.3 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: six in c:\users\soha\appdata\roaming\python\python37\site-packages (from psqlparse==1.0rc7) (1.16.0)
Building wheels for collected packages: psqlparse
Building wheel for psqlparse (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
c:\users\soha\appdata\local\programs\python\python375\lib\site-packages\setuptools\dist.py:529: UserWarning: Normalizing '1.0-rc7' to '1.0rc7'
warnings.warn(tmpl.format(**locals()))
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\psqlparse
copying psqlparse\exceptions.py -> build\lib.win-amd64-cpython-37\psqlparse
copying psqlparse\__init__.py -> build\lib.win-amd64-cpython-37\psqlparse
creating build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\nodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\parsenodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\primnodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\utils.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\value.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\__init__.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
running build_ext
error: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psqlparse
Running setup.py clean for psqlparse
Failed to build psqlparse
Installing collected packages: psqlparse
Running setup.py install for psqlparse ... error
error: subprocess-exited-with-error
× Running setup.py install for psqlparse did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
c:\users\soha\appdata\local\programs\python\python375\lib\site-packages\setuptools\dist.py:529: UserWarning: Normalizing '1.0-rc7' to '1.0rc7'
warnings.warn(tmpl.format(**locals()))
running install
c:\users\soha\appdata\local\programs\python\python375\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. U
se build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\psqlparse
copying psqlparse\exceptions.py -> build\lib.win-amd64-cpython-37\psqlparse
copying psqlparse\__init__.py -> build\lib.win-amd64-cpython-37\psqlparse
creating build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\nodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\parsenodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\primnodes.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\utils.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\value.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
copying psqlparse\nodes\__init__.py -> build\lib.win-amd64-cpython-37\psqlparse\nodes
running build_ext
error: [WinError 2] The system cannot find the file specified
[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.
╰─> psqlparse
This package is easily installed by the second installation method i.e. "pip install -U psqlparse==1.0rc7" in google colab, but I am facing problems to install it in my system. I really need this package.
My system: Windows 10 64bit
How should I solve this problem?

How solving Problem installing the noise package

I tried to install noise Python package, but I encountered this error
`
PS C:\Users\MacBook\Desktop\python-superhi> python -m pip install noise
Collecting noise
Using cached noise-1.2.2.zip (132 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: noise
Building wheel for noise (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\noise
copying perlin.py -> build\lib.win-amd64-cpython-310\noise
copying shader.py -> build\lib.win-amd64-cpython-310\noise
copying shader_noise.py -> build\lib.win-amd64-cpython-310\noise
copying test.py -> build\lib.win-amd64-cpython-310\noise
copying init.py -> build\lib.win-amd64-cpython-310\noise
running build_ext
building 'noise._simplex' 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 noise
Running setup.py clean for noise
Failed to build noise
Installing collected packages: noise
Running setup.py install for noise ... error
error: subprocess-exited-with-error
× Running setup.py install for noise did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running install
C:\Users\MacBook\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\noise
copying perlin.py -> build\lib.win-amd64-cpython-310\noise
copying shader.py -> build\lib.win-amd64-cpython-310\noise
copying shader_noise.py -> build\lib.win-amd64-cpython-310\noise
copying test.py -> build\lib.win-amd64-cpython-310\noise
copying init.py -> build\lib.win-amd64-cpython-310\noise
running build_ext
building 'noise._simplex' 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> noise
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
`
please help me to solve this
It is always better to use PyCharm IDE for python projects because it is easy to download modules and to setup environment.
you can download this IDE here: download

Not able to install OCRPaddle for WIndows

I'm trying to install the PaddleOCR package following the Quick Start Guide. When I run this command to install PaddleOCR Whl Package:
pip install "paddleocr>=2.0.1" # Recommend to use version 2.0.1+
I'm getting this error when building the Poligon3 wheel:
Building wheel for Polygon3 (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Using NumPy extension!
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\__init__.py -> build\lib.win-amd64-cpython-37\Polygon
running build_ext
building 'Polygon.cPolygon' 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 Polygon3
Running setup.py clean for Polygon3
Failed to build Polygon3
Installing collected packages: Polygon3, lmdb, zipp, typing-extensions, tifffile, shapely, scipy, rapidfuzz, PyWavelets, python-dateutil, pyparsing, pycryptodome, opencv-python, opencv-contrib-python, networkx, MarkupSafe, lxml, itsdangerous, imageio, future, fonttools, et-xmlfile, dill, cython, cycler, cssselect, colorama, cachetools, Babel, attrdict, Werkzeug, tqdm, pandas, packaging, openpyxl, multiprocess, kiwisolver, Jinja2, importlib-metadata, bce-python-sdk, scikit-image, matplotlib, cssutils, click, premailer, imgaug, flask, Flask-Babel, visualdl, paddleocr
Running setup.py install for Polygon3 ... error
error: subprocess-exited-with-error
× Running setup.py install for Polygon3 did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Using NumPy extension!
running install
C:\Users\jd\miniconda3\envs\ocrpaddle\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\Polygon
copying Polygon\IO.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Shapes.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\Utils.py -> build\lib.win-amd64-cpython-37\Polygon
copying Polygon\__init__.py -> build\lib.win-amd64-cpython-37\Polygon
running build_ext
building 'Polygon.cPolygon' 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: legacy-install-failure
× Encountered error while trying to install package.
╰─> Polygon3
note: This is an issue with the package mentioned above, not pip.
Has anyone encountered this problem? I'm using a conda environment with Python 3.7.
It is clearly mentioned that you need to install "Microsoft Visual C++ 14.0 or above"
Please install it and you are good to go.

How can I install 'emopt' library in python

I'm trying to install emopt library, but this error occurs.
Could you let me know how to fix this errors and how to install emopt ?
Thanks.
error code
C:\WINDOWS\system32>pip install emopt
Collecting emopt
Using cached emopt-0.2.3.1.tar.gz (51 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: emopt
Building wheel for emopt (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\emopt
copying emopt\adjoint_method.py -> build\lib\emopt
copying emopt\fdfd.py -> build\lib\emopt
copying emopt\fomutils.py -> build\lib\emopt
copying emopt\grid.py -> build\lib\emopt
copying emopt\misc.py -> build\lib\emopt
copying emopt\modedata.py -> build\lib\emopt
copying emopt\modes.py -> build\lib\emopt
copying emopt\optimizer.py -> build\lib\emopt
copying emopt\__init__.py -> build\lib\emopt
creating build\lib\emopt\data
copying emopt\data\silicon.csv -> build\lib\emopt\data
installing to build\bdist.win-amd64\wheel
running install
error: [WinError 2] 지정된 파일을 찾을 수 없습니다
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for emopt
Running setup.py clean for emopt
Failed to build emopt
Installing collected packages: emopt
Running setup.py install for emopt ... error
error: subprocess-exited-with-error
× Running setup.py install for emopt did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
running install
error: [WinError 2] 지정된 파일을 찾을 수 없습니다
[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.
╰─> emopt
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Have you tried the installation instructions provided here?
It seems that other dependencies are installed via local package management tools like apt or pip, while EMopt is installed by cloning the repository and install it with the install.py script inside the repo.

how to install channels_redis module in django without errors

am trying to install channels_redis in Django using pip but so far am getting this error:
Building wheel for hiredis (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
C:\Users\Teacher-5F84DF\AppData\Local\Temp\pip-install-a7pi2nhv\hiredis_6b689b761b5b44cc87e6dbe9cbaa0597\setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import sys, imp, os, glob, io
c:\users\teacher-5f84df\appdata\local\programs\python\python310\lib\site-packages\setuptools\dist.py:697: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\hiredis
copying hiredis\version.py -> build\lib.win-amd64-3.10\hiredis
copying hiredis\__init__.py -> build\lib.win-amd64-3.10\hiredis
copying hiredis\hiredis.pyi -> build\lib.win-amd64-3.10\hiredis
copying hiredis\py.typed -> build\lib.win-amd64-3.10\hiredis
running build_ext
building 'hiredis.hiredis' 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]
I tried installing pip install python-dev-tools but dint work.Please help am stuck.
You need to dowload Microsoft C++ build tool.

Categories