Skip to content

Commit 0a207a9

Browse files
fixe mac issue and correct requirements
- When using a mac, matplotlib doesn't use the correct backend - change PIL to pillow in requirements.txt
1 parent 3fea596 commit 0a207a9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

black_hole.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from tkinter.filedialog import askopenfilename
2323

2424
import matplotlib.pyplot as plt # Graphical module
25+
import matplotlib
26+
if matplotlib.get_backend() not in ("TKAgg", "Qt5Agg"):
27+
matplotlib.use("TKAgg", force=True)
2528
#from matplotlib.widgets import Slider # TODO: use it for offset GUI
2629
import numpy as np # Use for matrices and list
2730
from scipy.interpolate import interp1d # Use for interpolation
@@ -1021,4 +1024,3 @@ def approching_blackhole():
10211024
# blackhole.open(img_name, size=360)
10221025
# blackhole.img_resize(360)
10231026
# blackhole.compute(Rs=8, D=50)
1024-

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
numpy>=1.14
22
matplotlib>=3.1
33
scipy>=1.1
4-
PIL>=5.1
4+
pillow>=5.1

0 commit comments

Comments
 (0)