forked from carsonfarmer/python_geospatial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_env.py
46 lines (41 loc) · 1.38 KB
/
check_env.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
import warnings
with warnings.catch_warnings(record=True) as w:
# Main stuff
import numpy
import pandas
import scipy
import sqlite3
import matplotlib
import shapely
import fiona
import rasterio
import pyproj
import descartes
import geopandas
import shapefile
import cartopy
import mplexporter
import mplleaflet
import geojsonio
# Optional stuff
try:
import mpl_toolkits.basemap
import psycopg2
except ImportError, err:
print("Error: " + unicode(err))
print("This is not a required package.\n")
print("See Known Issues for additional information: "
"https://github.com/cfarmer/python_geospatial/blob/master/install.md#known-issues")
if len(w) > 0:
for i in w:
if "openpyxl" in unicode(i.message):
print("\nPandas is installed, but you might have a dependency issue. "
"To fix this, try the following:\n"
" $ pip install openpyxl\n"
" $ pip uninstall openpyxl\n"
" $ pip install openpyxl==1.8.6\n"
"See Known Issues for additional information: "
"https://github.com/cfarmer/python_geospatial/blob/master/install.md#known-issues")
import sys
sys.exit(0)
print("Everything looks good!")