Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 machines

3. 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://raw.githubusercontent.com/ManimCommunity/manim/master/scripts/pycairoInstall.py -UseBasicParsing).Content | py -3
```



#### FFmpeg Installation
1. 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`
Expand Down
51 changes: 51 additions & 0 deletions Scripts/pycairoInstall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import platform
import os
import sys
import urllib.request

if 'Windows' in platform.system():
#In case the python version is 3.6 and the system is 32-bit, try pycairo‑1.19.1‑cp37‑cp37m‑win32.whl version of cairo
if sys.version[:3]=='3.6' and platform.machine()=='x86':
urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp36-cp36m-win32.whl", "pycairo-1.19.1-cp36-cp36m-win32.whl")
os.system("pip install pycairo-1.19.1-cp36-cp36m-win32.whl")
os.remove("pycairo-1.19.1-cp37-cp37m-win32.whl")

#In case the python version is 3.6 and the system is 64-bit, try pycairo‑1.19.1‑cp37‑cp37m‑win32.whl version of cairo
elif sys.version[:3]=='3.6' and platform.machine()=='AMD64':
urllib.request.urlretrieve("https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/pycairo-1.19.1-cp36-cp36m-win_amd64.whl", "pycairo-1.19.1-cp36-cp36m-win_amd64.whl")
print("Sucessfully downloaded Cairo for your system")
print("Installing Cairo")
os.system("pip install pycairo-1.19.1-cp36-cp36m-win_amd64.whl")
os.remove("pycairo-1.19.1-cp36-cp36m-win_amd64.whl")

#In case the python version is 3.7 and the system is 32-bit, try pycairo‑1.19.1‑cp37‑cp37m‑win32.whl version of cairo
elif 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")

#In case the python version is 3.7 and the system is AMD64, try pycairo-1.19.1-cp37-cp37m-win_amd64.whl version of cairo
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("pip install pycairo-1.19.1-cp37-cp37m-win_amd64.whl")
os.remove("pycairo-1.19.1-cp37-cp37m-win_amd64.whl")

#In case the python version is 3.8 and the system is 32-bit, try pycairo-1.19.1-cp38-cp38-win32.whl version of cairo
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("pip install pycairo-1.19.1-cp38-cp38-win32.whl")
os.remove("pycairo-1.19.1-cp38-cp38-win32.whl")

#In case the python version is 3.8 and the system is AMD64, try pycairo-1.19.1-cp38-cp38-win_amd64.whl version of cairo
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")
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
]
},
install_requires=[
"colour",
"argparse",
"colour",
"numpy",
Expand Down