Skip to content

setup.py imports numpy, but numpy is an install time dependency #144

@mrshannon

Description

@mrshannon

The setup.py file imports numpy which is an installation dependency. Because installation order cannot be specified (in order to ensure numpy is installed first), any package that depends on cf-units may also fail to install because numpy may not exist.

To reproduce the problem create a fresh virtualenv and run pip install cf-units which will result in:

pip install cf-units
Collecting cf-units
  Using cached https://files.pythonhosted.org/packages/ae/31/d803fd21a960db0cd9d03fd134e3551dfc96a8536956d8309caa4f44db90/cf-units-2.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-1f2to47t/cf-units/setup.py", line 7, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1f2to47t/cf-units/

Therefore, cf-units is effectively broken for the standard python tool chain.

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