Skip to content

Import expects deps installed before they are installed #245

@vsoch

Description

@vsoch

Hiya! When you do this import:

from pyDeltaRCM import shared_tools

You are technically importing your module before you've installed it, so all the dependencies are expected to be there:

       File "/tmp/tmp9e8wd_fn/pyDeltaRCM/pyDeltaRCM/__init__.py", line 1, in <module>
          from .model import DeltaModel
        File "/tmp/tmp9e8wd_fn/pyDeltaRCM/pyDeltaRCM/model.py", line 7, in <module>
          from .iteration_tools import iteration_tools
        File "/tmp/tmp9e8wd_fn/pyDeltaRCM/pyDeltaRCM/iteration_tools.py", line 7, in <module>
          import matplotlib.pyplot as plt

If you just need the version:

version=shared_tools._get_version(),

perhaps you could just read it statically from a file? Or some other means? There are ways to install specific modules before running your main setup, e.g.,

from setuptools import dist
dist.Distribution().fetch_build_eggs(['numpy>=1.10'])

But I don't think this applies here because you are trying to use the shared_tools in your module, and thus import everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions