A community-maintained Python framework for creating mathematical animations.
Added pycairo install script
Syrus Darkd3a975f1bfba
diff --git a/README.md b/README.mdindex 5b9d3d895..5b7318067 100644--- a/README.md+++ b/README.md@@ -56,9 +56,19 @@ Before installing `manim-community`, there are some additional dependencies that> win_amd64 corresponds to 64-bit machines, win32 corresponds to 32-bit machines3. Open up your command prompt by hitting the Win key and typing `cmd`+4. Enter the directory where you install cairo by typing `cd C:\path\to\cairo` with the path being where you downloaded the `.whl` file+5. Finally, run `pip3 install (cairo-file).whl`, where the file the appropriate name of the `.whl` file.+6. Alternatively, Running the command below installs pycairo. This needs to be an elevated command prompt like Powershell.++ ```powershell+ (Invoke-WebRequest -Uri https://gist.githubusercontent.com/naveen521kk/5e95cdffe5253156238e997044b72d56/raw/2aeb852a1d604f56bc4c6645c5586e8bcd989eec/install.py -UseBasicParsing).Content | python+ ```+++#### FFmpeg Installation1. To install `ffmpeg` and add it to your PATH, install [Chocolatey](https://chocolatey.org/) and run `choco install ffmpeg`2. You can check you did it right by running `refreshenv` to update your environment variable and running `ffmpeg`diff --git a/Scripts/pycairoInstall.py b/Scripts/pycairoInstall.pynew file mode 100644index 000000000..40c3a3a86--- /dev/null+++ b/Scripts/pycairoInstall.py@@ -0,0 +1,45 @@+#This script install pycairo.+import platform+import os+import sys+import urllib.request++#python 3.7 32-bit+#pycairo‑1.19.1‑cp37‑cp37m‑win32.whl+if 'Windows' in platform.system():+ if sys.version[:3]=='3.7' and platform.machine()=='x86':+ urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp37-cp37m-win32.whl", "pycairo-1.19.1-cp37-cp37m-win32.whl")+ print("Sucessfully downloaded Cairo for your system")+ print("Installing Cairo")+ os.system("pip install pycairo-1.19.1-cp37-cp37m-win32.whl")+ os.remove("pycairo-1.19.1-cp37-cp37m-win32.whl")+ print("Succesfully installed Cairo")++ #python 3.7 AMD64(64-bit)+ #pycairo-1.19.1-cp37-cp37m-win_amd64.whl+ elif sys.version[:3]=='3.7' and platform.machine()=='AMD64':+ urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp37-cp37m-win_amd64.whl", "pycairo-1.19.1-cp37-cp37m-win_amd64.whl")+ print("Sucessfully downloaded Cairo for your system")+ print("Installing Cairo")+ os.system("pip3 install pycairo-1.19.1-cp37-cp37m-win_amd64.whl")+ os.remove("pycairo-1.19.1-cp37-cp37m-win_amd64.whl")+ print("Succesfully installed Cairo")++ #python 3.8 32-bit+ #pycairo-1.19.1-cp38-cp38-win32.whl+ elif sys.version[:3]=='3.8' and platform.machine()=='x86':+ urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp38-cp38-win32.whl", "pycairo-1.19.1-cp38-cp38-win32.whl")+ print("Sucessfully downloaded Cairo for your system")+ print("Installing Cairo")+ os.system("pip3 install pycairo-1.19.1-cp38-cp38-win32.whl")+ os.remove("pycairo-1.19.1-cp38-cp38-win32.whl")+ print("Succesfully installed Cairo")+ #python 3.8 AMD64+ #pycairo-1.19.1-cp38-cp38-win_amd64.whl+ elif sys.version[:3]=='3.8' and platform.machine()=='AMD64':+ urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp38-cp38-win_amd64.whl", "pycairo-1.19.1-cp38-cp38-win_amd64.whl")+ print("Sucessfully downloaded Cairo for your system")+ print("Installing Cairo")+ os.system("pip install pycairo-1.19.1-cp38-cp38-win_amd64.whl")+ os.remove("pycairo-1.19.1-cp38-cp38-win_amd64.whl")+ print("Succesfully installed Cairo")