I'm making a folium map tool in Python and need to make and executable for Windows, but I need a version for macOS also (Probably will convert to .app
).
My code works fine on windows but webbrowser.open()
does not work on macOS. Any ideas on how I can work around this?
Here's an example of code for a folium map:
import folium
import webbrowser
map = folium.Map(
location=[39.82, -100],
zoom_start=4)
folium.Marker(location=[39.82, -100]).add_to(map)
# Save map as html file and open in default web browser
map.save("Map.html")
webbrowser.open("Map.html")