-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Hello everyone. May I recommend the following revisions to the installation process below. I've been testing it on my personal download of MintPy and it can run the MintPy analysis just fine. I'm hoping this will work in other operating systems and so that you don't have to make separate instructions for Linux/MacOS/Windows.
My testing environment:
- Windows 8.1/Windows 10
- Python 3.8 Anaconda
Description of the desired feature
Update MintPy installation process so that it is easier to install.
Describe the solution you'd like
Here are some of the revisions I did in my testing environment.
- Create a
setup.pyfor pyaps3
I've been using a simple setup script as seen in the codeblock below and it works for me. I'm able to importpyaps3as a normal Python library. Icdinto the pyaps directory and usepython setup.py install.
from setuptools import setup, find_packages
setup(
name='pyaps3',
version='1.0',
author='Angelique Benoit',
packages=find_packages(include=['pyaps3', 'pyaps3.*']),
package_data={'': ['*.cfg', 'LICENSE']},
include_package_data=True
)- Remove
openmpfrom MintPysetup.pyfile.
openmp does not exist in the pip library. It exists in the conda library here. In my experience you can run python setup.py install if you remove openmp and you can run and import the MintPy software without any issue. However, I noticed some errors pop up due to improper formatting in lookup_geo2radar.py as seen in the image below.
Notes on Config Files:
Installing in the standard python path will make the config file harder to access. We can access the location of the CFG file by doing this:
import pyaps3
import os
pyaps3_cfg_dir = os.path.dirname(pyaps3.__file__)
pyaps3_cfg_path = os.path.join(pyaps3_cfg_dir, 'model.cfg')My installation process:
After those revisions my final installation process is as follows:
- Create virtual environment using provided
conda_env.ymlfile - Run
python setup.py installfor MintPy - Run
python setup.py installfor PyAPS3
I did not need to setup any environment variables.
Are you willing to help implement and maintain this feature? Yes/No
Yes.
I'm not sure if this method works on MacOS and Linux operating systems. May someone try?
