How I cam fix error in installing pyminzip - python

When I try to install pyminzip I see this
C:\Users\User>pip install pyminizip
Collecting pyminizip
Downloading pyminizip-0.2.4.tar.gz (258 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 258.7/258.7 kB 155.4 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyminizip
Building wheel for pyminizip (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'pyminizip' 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 pyminizip
Running setup.py clean for pyminizip
Failed to build pyminizip
Installing collected packages: pyminizip
Running setup.py install for pyminizip ... error
error: subprocess-exited-with-error
× Running setup.py install for pyminizip did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running install
C:\Users\User\AppData\Local\Programs\Python\Python38\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_ext
building 'pyminizip' 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.
╰─> pyminizip
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

It's explicitly said :
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/
Please install Microsoft Visual C++ compiler to make it work

Related

Install C++ extension for Python

I'm quite a noob in Python, but I'm using PyCharm as my IDE and I want to install and use TLSH: https://pypi.org/project/python-tlsh/
So what I did (in order to use TLSH, I have to install python-tlsh, so I run this command in the windows command prompt (run as an administrator):
C:\Users\myname\AppData\Local\Programs\Python\Python310\Scripts>pip install python-tlsh
but then I get this error:
`Collecting python-tlsh
Using cached python-tlsh-4.5.0.tar.gz (40 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-tlsh
Building wheel for python-tlsh (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'tlsh' 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 python-tlsh
Running setup.py clean for python-tlsh
Failed to build python-tlsh
Installing collected packages: python-tlsh
Running setup.py install for python-tlsh ... error
error: subprocess-exited-with-error
× Running setup.py install for python-tlsh did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running install
C:\Users\myname\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_ext
building 'tlsh' 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.
╰─> python-tlsh
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.`
so I installed Microsoft Visual C++ x64 (at least I think I did): https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170, I continued without code (maybe I need an account or so..?), but it still doesn't work. I tried it via the terminal of PyCharm, doesn't work either.
#tyfon-e Thank you, but then I get a similar error, also when I execute it in the terminal of Pycharm. it keeps saying that I need Visual Studio, while I already installed Build Tools and Community and also enabled C++ Build Tools
Also, Stackoverflow rejects my edit because "I should have posted it as a comment", not considering the fact that I can't post comments because it's a relatively new account and I need to have 50 points.
Try to install it from Pycharm Settings.
Head to File --> Settings --> Project then Python Interpreter.
down you will have "+" button, click it and search for it there.
Look at this Image

Unable to install mysqlclient in django

I am using the latest python version 3.11 in django framework, for that I need to install mysqlclient . But there was error when I try to install
pip install mysqlclient
Output like this as error:
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
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 mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
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
╰─> [25 lines of output]
running install
C:\Users\dsema\PycharmProjects\stock\venv\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_ext
building 'MySQLdb._mysql' 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.
╰─> mysqlclient
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Any idea can solve it?
You're evidently on Windows, so you'd want to make sure pip attempts to use binary packages of mysqlclient rather than even attempting to build one from scratch:
pip install mysqlclient --only-binary=mysqlclient
However, this may install an older version of mysqlclient since there are no binary packages for the 32-bit Python 3.11 you're using. If your machine is capable of running the 64-bit version, I would strongly recommend you switch to it instead, since it's likely 32-bit support will be waning more and more in the near future.

how to resolve 'pyResMan' installation error

I have tried to install 'pyResMan' but found below errors,
C:\Users>pip install pyResMan
Collecting pyResMan
Using cached pyResMan-5.0.2-py2.py3-none-any.whl
Requirement already satisfied: peppercorn in d:\program files\python39\lib\site-packages (from pyResMan) (0.6)
Collecting pyGlobalPlatform
Using cached pyGlobalPlatform-1.4.16.zip (18 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pyscard in d:\program files\python39\lib\site-packages (from pyResMan) (2.0.3)
Building wheels for collected packages: pyGlobalPlatform
Building wheel for pyGlobalPlatform (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\pyGlobalPlatform
copying pyGlobalPlatform\globalplatformlib.py -> build\lib.win-amd64-cpython-39\pyGlobalPlatform
copying pyGlobalPlatform_init_.py -> build\lib.win-amd64-cpython-39\pyGlobalPlatform
running build_ext
building 'pyGlobalPlatform.pyGlobalPlatform' 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 pyGlobalPlatform
Running setup.py clean for pyGlobalPlatform
Failed to build pyGlobalPlatform
Installing collected packages: pyGlobalPlatform, pyResMan
Running setup.py install for pyGlobalPlatform ... error
error: subprocess-exited-with-error
× Running setup.py install for pyGlobalPlatform did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
running install
D:\Program Files\Python39\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-39
creating build\lib.win-amd64-cpython-39\pyGlobalPlatform
copying pyGlobalPlatform\globalplatformlib.py -> build\lib.win-amd64-cpython-39\pyGlobalPlatform
copying pyGlobalPlatform_init_.py -> build\lib.win-amd64-cpython-39\pyGlobalPlatform
running build_ext
building 'pyGlobalPlatform.pyGlobalPlatform' 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.
╰─> pyGlobalPlatform
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Could anyone please help me to solve this.
The error message tells you- you need Microsoft Visual C++ 14.0 or greater
Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/```

python speech recognition not getting install [duplicate]

This question already has answers here:
I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?
(17 answers)
Closed 8 months ago.
I have being tiring to install python speech recognition for a long time but getting the same problem on running
pip install pyaudio
Output:
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' 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 pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' 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.
╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
As I understand from:
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/
I had to install 'Microsoft Visual C++ 14.0 or greater' so I did. But same result even after
that!
What am I supposes to do.
You can try this
pip install pipwin
then
pipwin install pyaudio
This is not a problem with just you, everyone faces this.
Here's a fix I hope will work for you:
pip install pipwin
pipwin install pyaudio
to install pyaudio via pipwin, sometimes the command doesn't work so try
pipwin refresh and run pipwin install pyaudio again
If the above steps do not work, try going to Python Packages and install your system-specific version of pyaudio.
then opening a cmd instance in the directory you installed the package and run
pip install package
replace 'package' with the name of the file you downloaded.

PyminiZip install error - error: legacy-install-failure

I am getting below error message. I already installed all the required components mentioned below.
Collecting pyminizip
Using cached pyminizip-0.2.6.tar.gz (261 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pyminizip, since package 'wheel' is not installed.
Installing collected packages: pyminizip
Running setup.py install for pyminizip ... error
error: subprocess-exited-with-error
× Running setup.py install for pyminizip did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running install
running build
running build_ext
building 'pyminizip' 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.
╰─> pyminizip
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Categories