[Solved][Ubuntu/Mint] FastGWR Not Working
Closed this issue · 0 comments
I had issues with FastGWR on two Linux Mint (Ubuntu derivative) machines. One was Linux Mint 19.3 (tricia/bionic) with python 3.8.0 and the other was Linux Mint 20 (ulyana/focal) with python 3.8.5. fastgwr --version
worked, but when testing/running the software, I was getting various errors about mpiexec despite mpiexec being installed. The error ended up being that I needed to update alternatives for python because both systems had python2 and python3 installed.
To check if you have the same problem run:
>>> update-alternatives --list python
update-alternatives: error: no alternatives for python
If you get the error above, follow the steps in this article to update alternatives to set Python to the correct version. I was using Python 3.8 so for both machines the solution was:
>>> sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
update-alternatives: using /usr/bin/python3.8 to provide /usr/bin/python (python) in auto mode
This comand sets python3.8 to your first priority alternative for python. To check this worked, run
>>> update-alternatives --list python
/usr/bin/python3.8
You should get the correct python3 as the result of the command. To check that this solved the issue with FastGWR run:
>>> fastgwr testgwr
Testing GWR with zillow data:
------------------------------------------------------------
Starting FastGWR with 2 Processors
Spatial Kernel: Adaptive Bisquare
Data Input Path: https://raw.github.com/Ziqi-Li/FastGWR/master/Zillow-test-dataset/zillow_1k.csv
Output Result Path: fastgwr_rslt.csv
Intercept: True
Optimal Bandwidth Searching...
Range: 50 1000
BW, AICc 413.0 12499.779288982281
BW, AICc 637.0 12531.633782051933
BW, AICc 274.0 12474.956021862543
BW, AICc 189.0 12431.308996341173
BW, AICc 136.0 12409.551843948328
BW, AICc 103.0 12408.264954026834
BW, AICc 83.0 12421.22851668721
BW, AICc 116.0 12405.67119279391
BW, AICc 123.0 12406.489388497328
BW, AICc 111.0 12405.452378901939
BW, AICc 108.0 12405.964286829414
BW, AICc 113.0 12405.540369991997
BW, AICc 110.0 12405.334206357205
BW, AICc 109.0 12405.904039101335
Fitting GWR Using Bandwidth: 110.0
Diagnostic Information:
AICc: 12405.334206357205
ENP: 112.68000986186829
R2: 0.7543256014825577
Total Time Elapsed: 3.58 seconds
------------------------------------------------------------