Skip to content

installation process via conda and setup.py #497

@pbrotoisworo

Description

@pbrotoisworo

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.

  1. Create a setup.py for pyaps3
    I've been using a simple setup script as seen in the codeblock below and it works for me. I'm able to import pyaps3 as a normal Python library. I cd into the pyaps directory and use python 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
)
  1. Remove openmp from MintPy setup.py file.

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.

image

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:

  1. Create virtual environment using provided conda_env.yml file
  2. Run python setup.py install for MintPy
  3. Run python setup.py install for 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions