What is the current procedure to install app dependencies?

10 views
Skip to first unread message

Michael S

unread,
Mar 24, 2018, 1:06:26 AM3/24/18
to Tethys Platform
I know that before we would use the dependencies list in the setup.py, but this uses pip to install things instead of conda. It may work in most cases but not always (e.g. if gdal or other c libraries are required).

If there is no other method than manually installing, can't we just change the app_installation.py to call conda instead of pip?

def _run_develop(self):
    """
    The definition of the "run" method for the CustomDevelopCommand metaclass.
    """
   ...
    # Install dependencies
    for dependency in self.dependencies:
        subprocess.call(['pip', 'install', dependency])
    ...
    develop.run(self)

swainn

unread,
Mar 27, 2018, 10:51:14 AM3/27/18
to Tethys Platform
We haven't formalized a way to do it with conda yet, so I suppose the "official" way to do it is to list them in your setup.py and they are installed with pip. However, you could also create a requirements.txt file and list the dependencies in there. Then just use conda to install from file:

conda install --file requirements.txt
Reply all
Reply to author
Forward
0 new messages