Having problems with installing manimlib by 3blue1brown. Pycairo runs into a problem - python

I'm attempting to install the manimlib package by 3blue1brown for math animations, all goes well until the installation of pycairo
I have followed the instructions from https://github.com/3b1b/manim, downloading and installing all of the system requirements "ffmpeg, sox, latex and cairo"
I have also followed instructions to install the Microsoft Visual C++ Build Tools however the same error occurs.
I attempted to pip install manimlib and it displayed the errors below
Many other tutorials for installing manimlib all gave me the same error.
Building wheels for collected packages: pycairo
Building wheel for pycairo (setup.py) ... error
ERROR: Complete output from command 'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\jmcaw\AppData\Local\Temp\pip-wheel-mzptag15' --python-tag cp37:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cairo
copying cairo\__init__.py -> build\lib.win32-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
copying cairo\py.typed -> build\lib.win32-3.7\cairo
running build_ext
building 'cairo._cairo' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for pycairo
Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo, manimlib
Found existing installation: pycairo 1.18.1
Uninstalling pycairo-1.18.1:
Successfully uninstalled pycairo-1.18.1
Running setup.py install for pycairo ... error
ERROR: Complete output from command
'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jmcaw\AppData\Local\Temp\pip-record-bsapizpe\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cairo
copying cairo\__init__.py -> build\lib.win32-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
copying cairo\py.typed -> build\lib.win32-3.7\cairo
running build_ext
building 'cairo._cairo' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Rolling back uninstall of pycairo
Moving to c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\cairo\
from c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\~airo
Moving to c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\pycairo-1.18.1.dist-info\
from c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\~ycairo-1.18.1.dist-info
ERROR: Command "'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jmcaw\AppData\Local\Temp\pip-record-bsapizpe\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jmcaw\AppData\Local\Temp\pip-install-nh2i0b16\pycairo\
The installation on pycairo on its own works when using the file pycairo‑1.18.1‑cp37‑cp37m‑win32.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo, however it appears to try and uninstall this and install the version 1.18.0 instead of the latest 1.18.1.

Related

pip install error: Microsoft Visual C++ 14.0 or greater is required [duplicate]

This question already has answers here:
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Pip error: Microsoft Visual C++ 14.0 is required
(13 answers)
Closed 1 year ago.
I want to install Twint with:
pip install twint
But it failed and generating this error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\ramda\appdata\local\programs\python\python39\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';
__file__='"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ramda\AppData\Local\Temp\pip-record-itnmxqui\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\ramda\appdata\local\programs\python\python39\Include\pycares'
cwd: C:\Users\ramda\AppData\Local\Temp\pip-install-lbx86gde\pycares\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\pycares
copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
running build_ext
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_cares.c'
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
building '_cares' 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\ramda\appdata\local\programs\python\python39\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';
__file__='"'"'C:\\Users\\ramda\\AppData\\Local\\Temp\\pip-install-lbx86gde\\pycares\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ramda\AppData\Local\Temp\pip-record-itnmxqui\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\ramda\appdata\local\programs\python\python39\Include\pycares' Check the logs for full command output.
It said:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools
But I already have Microsoft Visual C++ 14.* in my machine. In fact that when I tried to install it again, it says "it has already installed on your machine" or something similar like that.
I've tried a lot of ways that are written in this SO discussion. But no one works for me.
Download and install Microsoft Visual Studio build tools from https://visualstudio.microsoft.com/en/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
Reboot your computer
Upgrade pip with command python -m pip install --upgrade pip
Run your command python -m pip install twint to install the package
Upgrade your pip with: python -m pip install --upgrade pip
Upgrade your wheel with: pip install --upgrade wheel
Upgrade your setuptools with: pip install --upgrade setuptools
Close the terminal and try installing the package again.

Error on installing Python package with pip

I am trying to install eif package, used for extended isolation forest algorithm, but the installation is failing. I get this error on trying pip install eif or pip install git+https://github.com/sahandha/eif.git:
How can I install the library properly?
Collecting git+https://github.com/sahandha/eif.git
Cloning https://github.com/sahandha/eif.git to c:\users\iulyd\appdata\local\temp\pip-req-build-he0z1rvd
Running command git clone -q https://github.com/sahandha/eif.git 'C:\Users\iulyd\AppData\Local\Temp\pip-req-build-he0z1rvd'
Requirement already satisfied: numpy in d:\anaconda_install\lib\site-packages (from eif==2.0.2) (1.16.5)
Requirement already satisfied: cython in d:\anaconda_install\lib\site-packages (from eif==2.0.2) (0.29.13)
Building wheels for collected packages: eif
Building wheel for eif (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda_install\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\iulyd\AppData\Local\Temp\pip-wheel-asla68oq' --python-tag cp37
cwd: C:\Users\iulyd\AppData\Local\Temp\pip-req-build-he0z1rvd\
Complete output (21 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying eif_old.py -> build\lib.win-amd64-3.7
copying version.py -> build\lib.win-amd64-3.7
running egg_info
creating eif.egg-info
writing eif.egg-info\PKG-INFO
writing dependency_links to eif.egg-info\dependency_links.txt
writing requirements to eif.egg-info\requires.txt
writing top-level names to eif.egg-info\top_level.txt
writing manifest file 'eif.egg-info\SOURCES.txt'
reading manifest file 'eif.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'eif.egg-info\SOURCES.txt'
running build_ext
cythoning _eif.pyx to _eif.cpp
building 'eif' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Failed building wheel for eif
Running setup.py clean for eif
Failed to build eif
Installing collected packages: eif
Running setup.py install for eif ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda_install\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\iulyd\AppData\Local\Temp\pip-record-hyzyr_un\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\iulyd\AppData\Local\Temp\pip-req-build-he0z1rvd\
Complete output (19 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying eif_old.py -> build\lib.win-amd64-3.7
copying version.py -> build\lib.win-amd64-3.7
running egg_info
writing eif.egg-info\PKG-INFO
writing dependency_links to eif.egg-info\dependency_links.txt
writing requirements to eif.egg-info\requires.txt
writing top-level names to eif.egg-info\top_level.txt
reading manifest file 'eif.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'eif.egg-info\SOURCES.txt'
running build_ext
skipping '_eif.cpp' Cython extension (up-to-date)
building 'eif' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Anaconda_install\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"'; __file__='"'"'C:\\Users\\iulyd\\AppData\\Local\\Temp\\pip-req-build-he0z1rvd\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\iulyd\AppData\Local\Temp\pip-record-hyzyr_un\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

Can't install PyAudio in python [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 2 years ago.
I get the following ERROR while installing pyaudio
C:\Users\Admin\Downloads>pip install pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Complete output from command 'c:\users\admin\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-snth_fqh\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-3n7dvpm8\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command "'c:\users\admin\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-snth_fqh\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Admin\AppData\Local\Temp\pip-record-3n7dvpm8\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-snth_fqh\pyaudio\
You are missing Visual C++ from your computer. Download and install from here: https://www.microsoft.com/en-us/download/details.aspx?id=48145
and then re run the install for PyAudio.
Visual Studio changed the Build Tools from being C++ specific in late 2017. Thus newer Visual Studio versions work in place of older versions.
You can install it using:
1.https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
2.https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
Windows Python needs Visual C++ libraries installed via the SDK to build code.

pyaudio Library Installation Error How to fix it

When installing pyaudio in the command prompt with:
python -m pip install pyaudio
I get an error:
ERROR: Complete output from command 'C:\python\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-c823_6j8\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-vkr4rksd\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command "'C:\python\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-c823_6j8\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-vkr4rksd\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\admin\AppData\Local\Temp\pip-install-c823_6j8\pyaudio\
You can simply grab the proper Wheel package for your current Python version from here
and then install it with pip install <PyAudio‑0.2.11-...>.whl. (remember to use full filename (e.g pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl).
You don't need to download or any Microsoft Visual C++ Build Tools. Just do the following, it will be an ultimate fix:
After you go to this link: https://www.lfd.uci.edu/~gohlke/pythonlibs/ select and download the PyAudio for your Python version.
I downloaded:
PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
Place the downloaded file into the Scrips folder. My folder structure is:
`C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts`
Then you need to install the downloaded script by using the command:
python -m pip install "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts\PyAudio-0.2.11-cp37-cp37m-win_amd64.whl"

Can't Install Pyaudio

Can't install Pyaudio in my python 3.7..even tried installing visual c++.
pip install pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
Running setup.py bdist_wheel for pyaudio
Complete output from command "c:\users\vicky kumar\appdata\local\programs\python\python37\python.exe" -c "import setuptools;__file__='C:\\Users\\VICKYK~1\\AppData\\Local\\Temp\\pip-build-5v23nswh\\pyaudio\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\VICKYK~1\AppData\Local\Temp\tmprsn0men8pip-wheel-:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio
Complete output from command "c:\users\vicky kumar\appdata\local\programs\python\python37\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\VICKYK~1\\AppData\\Local\\Temp\\pip-build-5v23nswh\\pyaudio\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\VICKYK~1\AppData\Local\Temp\pip-m53gsf79-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command ""c:\users\vicky kumar\appdata\local\programs\python\python37\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\VICKYK~1\\AppData\\Local\\Temp\\pip-build-5v23nswh\\pyaudio\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\VICKYK~1\AppData\Local\Temp\pip-m53gsf79-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\VICKYK~1\AppData\Local\Temp\pip-build-5v23nswh\pyaudio
The reason that you cant install Pyaudio is your python version, the last version of python that support Pyaudio is python 3.6
So you have to install python 3.6 or 3.5 or 3.4 or python 2.7.
after installing python 3.6 use this link and download pyaudio.whl according to your os.
then use this command to install it:
pip install <package_name>.whl
To install the latest version of pyaudio using conda:
source activate -your environment name-
pip install pyaudio
If you encounter PortAudio development package error, install it with
sudo apt-get install portaudio19-dev

Categories

Resources