-
Notifications
You must be signed in to change notification settings - Fork 5
/
dependencies.py
344 lines (265 loc) · 8 KB
/
dependencies.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
from sverchok.dependencies import SvDependency
ex_dependencies = dict()
try:
import sverchok
from sverchok.dependencies import (
SvDependency,
ensurepip,
pip, scipy, geomdl, skimage,
mcubes, circlify,
FreeCAD
)
sverchok_d = ex_dependencies["sverchok"] = SvDependency(None, "https://github.com/nortikin/sverchok")
sverchok_d.module = sverchok
except ImportError:
message = "Sverchok addon is not available. Megapolis will not work."
print(message)
sverchok = None
#geopandas
geopandas_d = ex_dependencies["geopandas"] = SvDependency("geopandas", "https://geopandas.org/en/stable/")
geopandas_d.pip_installable = True
try:
import geopandas
geopandas_d.module = geopandas
except ImportError:
geopandas = None
#leafmap
leafmap_d = ex_dependencies["leafmap"] = SvDependency("leafmap", "https://leafmap.org/")
leafmap_d.pip_installable = True
try:
import leafmap
leafmap_d.module = leafmap
except ImportError:
leafmap = None
#osmnx
osmnx_d = ex_dependencies["osmnx"] = SvDependency("osmnx", "https://github.com/gboeing/osmnx")
osmnx_d.pip_installable = True
try:
import osmnx
osmnx_d.module = osmnx
except ImportError:
osmnx = None
#pandas
pandas_d = ex_dependencies["pandas"] = SvDependency("pandas", "https://pandas.pydata.org/")
pandas_d.pip_installable = True
try:
import pandas
pandas_d.module = pandas
except ImportError:
pandas = None
#laspy
laspy_d = ex_dependencies["laspy"] = SvDependency("laspy", "https://laspy.readthedocs.io/en/latest/installation.html")
laspy_d.pip_installable = True
try:
import laspy
laspy_d.module = laspy
except ImportError:
laspy = None
#rasterio
rasterio_d = ex_dependencies["rasterio"] = SvDependency("rasterio", "https://rasterio.readthedocs.io/en/latest/installation.html")
rasterio_d.pip_installable = True
try:
import rasterio
rasterio_d.module = rasterio
except ImportError:
rasterio = None
#pillow
pillow_d = ex_dependencies["pillow"] = SvDependency("pillow", "https://pillow.readthedocs.io/en/stable/")
pillow_d.pip_installable = True
try:
import PIL
pillow_d.module = PIL
except ImportError:
pillow = None
#mapillary
mapillary_d = ex_dependencies["mapillary"] = SvDependency("mapillary", "https://github.com/mapillary/mapillary-python-sdk")
mapillary_d.pip_installable = True
try:
import mapillary
mapillary_d.module = mapillary
except ImportError:
mapillary = None
#wget
wget_d = ex_dependencies["wget"] = SvDependency("wget", "https://pypi.org/project/wget/")
wget_d.pip_installable = True
try:
import wget
wget_d.module = wget
except ImportError:
wget = None
#networkx
networkx_d = ex_dependencies["networkx"] = SvDependency("networkx", "https://networkx.org/")
networkx_d.pip_installable = True
try:
import networkx
networkx_d.module = networkx
except ImportError:
networkx = None
#scikit-learn
scikitlearn_d = ex_dependencies["scikit-learn"] = SvDependency("scikit-learn", "https://scikit-learn.org/")
scikitlearn_d.pip_installable = True
try:
import sklearn
scikitlearn_d.module = sklearn
except ImportError:
sklearn = None
#streamlit
streamlit_d = ex_dependencies["streamlit"] = SvDependency("streamlit", "https://streamlit.io/")
streamlit_d.pip_installable = True
try:
import streamlit
streamlit_d.module = streamlit
except ImportError:
streamlit = None
#pyvista
pyvista_d = ex_dependencies["pyvista"] = SvDependency("pyvista", "https://docs.pyvista.org/")
pyvista_d.pip_installable = True
try:
import pyvista
pyvista_d.module = pyvista
except ImportError:
pyvista = None
#seaborn
seaborn_d = ex_dependencies["seaborn"] = SvDependency("seaborn", "https://seaborn.pydata.org/")
seaborn_d.pip_installable = True
try:
import seaborn
seaborn_d.module = seaborn
except ImportError:
seaborn = None
#visilibity
visilibity_d = ex_dependencies["visilibity"] = SvDependency("visilibity", "https://karlobermeyer.github.io/VisiLibity1/")
visilibity_d.pip_installable = True
try:
import visilibity
visilibity_d.module = visilibity
except ImportError:
visilibity = None
#opencv
opencvpython_d = ex_dependencies["opencv-python"] = SvDependency("opencv-python", "https://github.com/opencv/opencv-python")
opencvpython_d.pip_installable = True
try:
import cv2
opencvpython_d.module = cv2
except ImportError:
cv2 = None
#keplergl
keplergl_d = ex_dependencies["keplergl"] = SvDependency("keplergl", "https://github.com/keplergl/kepler.gl/tree/master/bindings/kepler.gl-jupyter")
keplergl_d.pip_installable = True
try:
import keplergl
keplergl_d.module = keplergl
except ImportError:
keplergl = None
#plotly
plotly_d = ex_dependencies["plotly"] = SvDependency("plotly", "https://plotly.com/python/")
plotly_d.pip_installable = True
try:
import plotly
plotly_d.module = plotly
except ImportError:
plotly = None
#requests
requests_d = ex_dependencies["requests"] = SvDependency("requests", "https://pypi.org/project/requests")
requests_d.pip_installable = True
try:
import requests
requests_d.module = requests
except ImportError:
requests = None
#richdem
richdem_d = ex_dependencies["richdem"] = SvDependency("richdem", "https://richdem.com/")
richdem_d.pip_installable = True
try:
import richdem
richdem_d.module = richdem
except ImportError:
richdem = None
#pythreejs
pythreejs_d = ex_dependencies["pythreejs"] = SvDependency("pythreejs", "https://github.com/jupyter-widgets/pythreejs")
pythreejs_d.pip_installable = True
try:
import pythreejs
pythreejs_d.module = pythreejs
except ImportError:
pythreejs = None
#bokeh
bokeh_d = ex_dependencies["bokeh"] = SvDependency("bokeh", "https://bokeh.org/")
bokeh_d.pip_installable = True
try:
import bokeh
bokeh_d.module = bokeh
except ImportError:
bokeh = None
#shapely
shapely_d = ex_dependencies["shapely"] = SvDependency("shapely", "https://pypi.org/project/shapely/")
shapely_d.pip_installable = True
try:
import shapely
shapely_d.module = shapely
except ImportError:
shapely = None
#requests
requests_d = ex_dependencies["requests"] = SvDependency("requests", "https://requests.readthedocs.io/en/latest/")
requests_d.pip_installable = True
try:
import requests
requests_d.module = requests
except ImportError:
requests = None
#pyproj
pyproj_d = ex_dependencies["pyproj"] = SvDependency("pyproj", "https://pypi.org/project/pyproj/")
pyproj_d.pip_installable = True
try:
import pyproj
pyproj_d.module = pyproj
except ImportError:
pyproj = None
#detectron2
detectron2_d = ex_dependencies["detectron2"] = SvDependency("detectron2", "https://detectron2.readthedocs.io/en/latest/tutorials/install.html")
detectron2_d.pip_installable = False
try:
import detectron2
detectron2_d.module = detectron2
except ImportError:
detectron2 = None
#torch
torch_d = ex_dependencies["torch"] = SvDependency("torch", "https://pytorch.org/")
torch_d.pip_installable = False
try:
import torch
torch_d.module = torch
except ImportError:
torch = None
#tabulate
tabulate_d = ex_dependencies["tabulate"] = SvDependency("tabulate", "https://github.com/astanin/python-tabulate")
tabulate_d.pip_installable = True
try:
import tabulate
tabulate_d.module = tabulate
except ImportError:
tabulate = None
#psutil
psutil_d = ex_dependencies["psutil"] = SvDependency("psutil", "https://github.com/giampaolo/psutil")
psutil_d.pip_installable = True
try:
import psutil
psutil_d.module = psutil
except ImportError:
psutil = None
#matplotlib
matplotlib_d = ex_dependencies["matplotlib"] = SvDependency("matplotlib", "https://matplotlib.org/")
matplotlib_d.pip_installable = True
try:
import matplotlib
matplotlib_d.module = matplotlib
except ImportError:
matplotlib = None
#richdem
richdem_d = ex_dependencies["richdem"] = SvDependency("richdem", "https://richdem.readthedocs.io/en/latest/")
richdem_d.pip_installable = True
try:
import richdem
richdem_d.module = richdem
except ImportError:
richdem = None