This question already has answers here:
Can't install Matplotlib on Python 3.10 after its release (2021-10-05)
(2 answers)
Closed 1 year ago.
i have a problem with installing matplotlib on my windows 10 machine
PS C:\Users\moham> pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: cycler>=0.10 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (1.3.2)
Requirement already satisfied: numpy>=1.16 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (1.21.3)
Requirement already satisfied: pillow>=6.2.0 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (8.4.0)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (3.0.3)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six>=1.5 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\moham\AppData\Local\Temp\pip-wheel-hj9g1qjt'
cwd: C:\Users\moham\AppData\Local\Temp\pip-install-flrd8ddj\matplotlib_7091154205ba4de6adb6e99636c201f9\
Complete output (553 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.4.3]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
C:\Users\moham\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py:148: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying lib\pylab.py -> build\lib.win-amd64-3.10
alot more lines from here
but somewhere in the middle it gets to this:
----------------------------------------
ERROR: Failed building wheel for matplotlib
Running setup.py clean for matplotlib
Failed to build matplotlib
Installing collected packages: matplotlib
Running setup.py install for matplotlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\moham\AppData\Local\Temp\pip-record-wj_x0r_i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\moham\AppData\Local\Programs\Python\Python310\Include\matplotlib'
cwd: C:\Users\moham\AppData\Local\Temp\pip-install-flrd8ddj\matplotlib_7091154205ba4de6adb6e99636c201f9\
Complete output (553 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.4.3]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
C:\Users\moham\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py:148: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
warnings.warn(
running install
C:\Users\moham\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\lib.win-amd64-3.10
copying lib\pylab.py -> build\lib.win-amd64-3.10
and alot more lines
and ends with this:
copying lib\matplotlib\mpl-data\images\zoom_to_rect_large.png -> build\lib.win-amd64-3.10\matplotlib\mpl-data\images copying lib\matplotlib\mpl-data\fonts\ttf\DejaVuSansDisplay.ttf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\ttf
copying lib\matplotlib\mpl-data\fonts\afm\pagdo8a.afm -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\afm
copying lib\matplotlib\mpl-data\images\matplotlib.pdf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\images
copying lib\matplotlib\backends\web_backend\css\page.css -> build\lib.win-amd64-3.10\matplotlib\backends\web_backend\css
copying lib\matplotlib\mpl-data\fonts\ttf\STIXSizFourSymBol.ttf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\ttf
UPDATING build\lib.win-amd64-3.10\matplotlib\_version.py
set build\lib.win-amd64-3.10\matplotlib\_version.py to '3.4.3'
running build_ext
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/
Building freetype in build\freetype-2.6.1
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\moham\AppData\Local\Temp\pip-record-wj_x0r_i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\moham\AppData\Local\Programs\Python\Python310\Include\matplotlib' Check the logs for full command output.
PS C:\Users\moham>
..................................................................................................................................................................................................................................................................................................................................................................................
The latest stable version is 3.4.3. On PyPI there is no matplotlib wheel for 3.10, yet. So it try to compile from source. And for that it needs Microsoft Visual C++ 14.0 or greater.
However you can download unofficial binary from Gohlke
Alternatively you can use pipwin to install it from Gohlke. Note there may still be problems with dependencies.
Of course, you can also downgrade to python3.9.
Related
I am facing this(failed to install face_recognition, pillow, dilib) problems more than 3 hours but it can not install. please solve anyone . here is error massage
Collecting face-recognition==1.3.0
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: numpy in c:\users\ajay kumar\downloads\attendance\venv\lib\site-packages (from face-recognition==1.3.0) (1.23.5)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\ajay kumar\downloads\attendance\venv\lib\site-packages (from face-recognition==1.3.0) (0.3.0)
Collecting dlib>=19.7
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: Click>=6.0 in c:\users\ajay kumar\downloads\attendance\venv\lib\site-packages (from face-recognition==1.3.0) (7.1.2)
Requirement already satisfied: Pillow in c:\users\ajay kumar\downloads\attendance\venv\lib\site-packages (from face-recognition==1.3.0) (9.3.0)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py): started
Building wheel for dlib (setup.py): finished with status 'error'
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Ajay Kumar\AppData\Local\Temp\pip-wheel-_d9j585t'
cwd: C:\Users\Ajay Kumar\AppData\Local\Temp\pip-install-milseje2\dlib_309f909f3c144f8cb6e2594feb25911f\
Complete output (8 lines):
running bdist_wheel
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
ERROR: CMake must be installed to build dlib
----------------------------------------
ERROR: Failed building wheel for dlib
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ajay Kumar\AppData\Local\Temp\pip-record-cv4pvl8s\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\include\site\python3.11\dlib'
cwd: C:\Users\Ajay Kumar\AppData\Local\Temp\pip-install-milseje2\dlib_309f909f3c144f8cb6e2594feb25911f\
Complete output (10 lines):
running install
C:\Users\Ajay Kumar\Downloads\ATTENDANCE\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
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
ERROR: CMake must be installed to build dlib
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ajay Kumar\\AppData\\Local\\Temp\\pip-install-milseje2\\dlib_309f909f3c144f8cb6e2594feb25911f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ajay Kumar\AppData\Local\Temp\pip-record-cv4pvl8s\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\include\site\python3.11\dlib' Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.3.1 is available.
You should consider upgrading via the 'C:\Users\Ajay Kumar\Downloads\ATTENDANCE\venv\Scripts\python.exe -m pip install --upgrade pip' command.
installing face_recognition, pillow, dilib library in python
I think you need to install CMake before build dlib
ERROR: CMake must be installed to build dlib
edit: Official cmake site https://cmake.org/download/
This question already has an answer here:
I can't install pyaudio on Windows 11? [duplicate]
(1 answer)
Closed 1 year ago.
I am attempting to make my own alexa and everytime I try to install pyaudio via the PyCharm terminal it comes up with this huge error:
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rajan\\AppData\\Lo
cal\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio_2
3e33d64381a4b7aa4337aa861032198\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import s
etup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\rajan\AppData\Local
\Temp\pip-wheel-hc4a9xm0'
cwd: C:\Users\rajan\AppData\Local\Temp\pip-install-88sq5u2t\pyaudio_23e33d64381a4b7aa4337aa861032198\
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
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/
----------------------------------------
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: Command errored out with exit status 1:
command: 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rajan\\AppData\\
Local\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio
_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\rajan\AppData\L
ocal\Temp\pip-record-n4u5ra3r\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\include\site\py
thon3.9\pyaudio'
cwd: C:\Users\rajan\AppData\Local\Temp\pip-install-88sq5u2t\pyaudio_23e33d64381a4b7aa4337aa861032198\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Te
mp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.Str
ingIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install -
-record 'C:\Users\rajan\AppData\Local\Temp\pip-record-n4u5ra3r\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\rajan\PycharmProje
cts\jarvisv2\venv\include\site\python3.9\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\*****\PycharmProjects\jarvisv2\venv\Scripts\python.exe -m pip install --upgrade pip' command.
How to solve this?
You need to install Microsoft Visual C++ 14.0 or greater.
Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Just download and install those build tools, then try again.
When installing certain packages, certain MS tools are required to build them.
Trying to download PyAudio by pip install PyAudio but this isn't working. I'm using Python 3.9.5
also tried python -m pip install pyaudio but it didn't work. Anyone having the same error??
help me solve this error please...
see the code below for reference ↓
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\keepa\AppData\Local\Temp\pip-wheel-trp3euxd'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
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/
----------------------------------------
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: Command errored out with exit status 1:
command: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio' Check the logs for full command output.
When running python 3.6 this works, but with python 3.7 it doesn't.
PyAudio only supports up to python 3.6:
pip will fetch and install PyAudio wheels (prepackaged binaries). Currently, there are wheels compatible with the official distributions of Python 2.7, 3.4, 3.5, and 3.6.
The workarounds would be to use a supported version of python, or to build and install manually - if the latter, you'll need to make sure you have the correct libraries installed and configured.
I should point out that PyAudio appears to be deprecated. It hasn't received an update since March 2017. Therefore I recommend you find another package for this.
Same problem due to the absence of Microsoft compiler that i didn't want to install on my PC.
I used this website unofficial pre-compiled pyaudio wheel packages, it worked well. So download wheel files at this site:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
Of course, download the wheel version that is compatible with your python version.
use the command:
pip install wheel_file_downloaded
pip install pipwin
python -m pipwin install pyaudio
This question already has answers here:
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools [duplicate]
(4 answers)
Closed 1 year ago.
So I am trying to use pip install bitarray but that results in a error, even I can't really understand. I have had this issue a while already with few other packages, today I installed a virtual environment and I tried to code again. I tried to install the package outside of this venv but I get the same error.
Collecting bitarray
Using cached bitarray-2.1.0.tar.gz (71 kB)
Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
Installing collected packages: bitarray
Running setup.py install for bitarray ... error
ERROR: Command errored out with exit status 1:
command: 'd:\workspace\work_env\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\desup\\Acal\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"'; __file__='"'"'C:\\Users\\desup\\AppData\\Local\\Temp\ll-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__se io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(cod_, '"'"'exec'"'"'))' install --record 'C:\Users\desup\AppData\Local\Temp\pip-record-c9vvo7_u\install-record.txt' --single-version-externally-manpile --install-headers 'd:\workspace\work_env\include\site\python3.9\bitarray'
cwd: C:\Users\desup\AppData\Local\Temp\pip-install-zbskwcko\bitarray_19f857dc240346679ec2269bbe2d36b2\
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\__init__.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\bitarray.h -> build\lib.win-amd64-3.9\bitarray
copying bitarray\pythoncapi_compat.h -> build\lib.win-amd64-3.9\bitarray
copying bitarray\test_data.pickle -> build\lib.win-amd64-3.9\bitarray
running build_ext
building 'bitarray._bitarray' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\workspace\work_env\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\desup\\AppData\\Local\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"'; __file__='"'"'C:\\Users\\desup\\AppData\\Local\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\desup\AppData\Local\Temp\pip-record-c9vvo7_u\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\workspace\work_env\include\site\python3.9\bitarray' Check the logs for full command output.```
This part
Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for
Visual Studio": https://visualstudio.microsoft.com/downloads/
suggest that you should install Microsoft Visual C++ 14.0 before installing bitarray. bitarray's PyPI page hints that you need working C compiler before installing bitarray.
I was working with sentiment analysis today, and when i started importing libraries i am unable to install wordcloud. it gives me an error as follows when i try to install pip install wordcloud. i also tried to install it by downloading it and copying it to my current directory and python -m pip install wordcloud-1.8.1-cp38-cp38-win_amd64.whl but that does not work too.
i.e. i am using windows, vscode and python3.9
The log error is
PS E:\projects\python\sentiment> pip install wordcloud
Collecting wordcloud
Using cached wordcloud-1.8.1.tar.gz (220 kB)
Requirement already satisfied: numpy>=1.6.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (1.20.3)
Requirement already satisfied: pillow in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (8.2.0)
Requirement already satisfied: matplotlib in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (3.4.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.8.1)
Requirement already satisfied: six in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.16.0)
Using legacy 'setup.py install' for wordcloud, since package 'wheel' is not installed.
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud'
cwd: C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main_.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' 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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud' Check the logs for full command output.
Try installed worcloud by .whl file.
Choose the version that suit for you. Wordcloud.whl
Use cmd and type this command:
step 1
cd *your file directory path*
step 2
pip install *the file name.whl*
The comment made by #Wojciech Jakubas is what worked for me.
Download the wordcloud‑1.8.1‑cp39‑cp39‑win_amd64.whl file from here
(Note that the cp39 in the filename reflects the python version YOU are using, so make sure you download the compatible file. e.g. here cp39 means python 3.9)
Open the command prompt in the directory where the downloaded file is located. Or just cd your way there.
Run this command python -m pip install wordcloud-1.8.1-cp39-cp39-win_amd64.whl
(again make sure to use the specific filename of the file that you download as that may vary depending on what python version you're downloading your file for)
I'm making this comment, for one because my reputation is too low to reply others and second because this answer sort of makes the steps involved explicit for accessibility's sake.
The problem is that wordcloud has no prebuilt wheels for python3.9 on windows. Therefore when you install it it will download the source code and try to build the wheel.
In order to successfully build this wheel you need a c compiler.
As the error suggests you can download Microsoft C++ Build Tools.
After downloading and installing (make sure you have the correct version between 32 and 64 bit depending on your python architecture) then retry doing pip install wordcloud