My notes on how to install MovingPandas from PyPI.
/home/myself/usr/local.Most builds are similar to this:
wget <somepackage>.tgz
tar zxvf <somepackage>.tgz
cd <somepackage>
./configure --prefix=/home/myself/usr/local <other flags as needed>
make
make install
Something somewhere tries to write to the system /tmp file. Point to somewhere that you have write access:
export TMPDIR=/home/myself/tmp
Download, build, and install Python3.7;
be sure to include --enable-shared
along with the other configure flags.
Consider also installng PostgreSQL V11 (not v12), PostGIS, and MobilityDB.
PROJ requires SQLite3, but when I installed it, it broke mobilitydb. My temporary solution was to install SQLite3 off to the side just to get PROJ to compile.
The SQLite download page listed an 'amalgamation' package, but I didn't get that to work. I just compiled directly from sources.
wget https://sqlite.org/2020/sqlite-src-3310100.zip
unzip sqlite-src-3310100.zip
cd sqlite-src-3310100
./configure --prefix=/home/myself/usr/local_sqlite
make
make TCLLIBDIR=/home/myself/usr/share_sqlite/usr/share/tcl8.5/sqlite3 install
(I have no idea why the make install insisted on a hardcoded TCLLIB,
but I had to override that to get the install to work.)
TODO: figure out how to get MobilityDB and SQLite to behave together.
WAIT: maybe it was Proj-6 that required 'sqlite3 >= 3.11'.
__WAIT #2:__proj-5 compiled and installed, but it was TOO OLD, MUST use later
TODO: see if these instructions work with installed (SQLite 3.7.1) version, and that no d/l or install of SQLite is needed! A: correct, I think the SQLite dependency was for the version of Proj that wasn't used.
Note: Cartopy needs Proj-4.9 or later
Note: projpy needs Proj-6 or Proj-7
Note: Proj-6 and Proj-7 need SQLite3
Note: SQLite3 breaks MobilityDB
Note: Proj-6 needs datumgrid, Proj-7 needs data
export PKG_CONFIG_PATH=/home/myself/usr/local/lib/pkgconfig/
export SQLITE3_CFLAGS=-I/home/myself/usr/local_sqlite/include
export SQLITE3_LIBS="-L/home/myself/usr/local_sqlite/lib -lsqlite3"
wget https://download.osgeo.org/proj/proj-6.3.1.tar.gz
tar zxvf proj-6.3.1.tar.gz
wget https://download.osgeo.org/proj/proj-datumgrid-1.8.zip
unzip proj-datumgrid-1.8.zip -d proj-6.3.1/data/
cd proj-6.3.1
./configure --prefix=/home/myself/usr/local
make
make install
Seemed to go ok.
Install directly using pip:
~/usr/local/bin/pip3.7 install Cython --install-option="--no-cython-compile"
Running setup.py install for Cython ... done
Successfully installed Cython-0.29.15
Seemed to install ok.
Finally, we can now install cartopy.
I think that this step depends on PKG_CONFIG_PATH pointing to the place where the proj.pc file is located. (As already set above.)
wget https://files.pythonhosted.org/.../Cartopy-0.17.0.tar.gz
tar zxvf Cartopy-0.17.0.tar.gz
cd Cartopy-0.17.0
~/usr/local/bin/python3.7 setup.py build_ext --inplace -I/home/myself/usr/local/include -L/home/myself/usr/local/lib
~/usr/local/bin/python3.7 setup.py install
Using /home/myself/usr/local/lib/python3.7/site-packages
Finished processing dependencies for Cartopy==0.17.0
It looks like it installed.
Note: sometimes install of cartopy was complaining about numpy being bad, but upon further analysis it seemed that the problem was really an invalid or missing Cython, and not anything to do with numpy.
Ok, here goes...
~/usr/local/bin/pip3.7 install movingpandas
Successfully built movingpandas bokeh PyYAML tornado
Installing collected packages: ... movingpandas
and to see if it really worked:
~/usr/local/bin/python3.7
Python 3.7.3 (default, Mar 3 2020, 21:42:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import movingpandas
>>>
YIPEE!!!!!!!!!!