eltonlaw / impyute

Data imputations library to preprocess datasets with missing data

Home Page:http://impyute.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup.py file not correctly specified

dmitrypolo opened this issue · comments

Python Version: Python 3.6.5
System: MacOS

When cloning this repo and trying to install it in a brand new environment with nothing installed yet, it fails when running pip install . or python setup.py install and even simply python setup.py --version.

    ▲ = python setup.py install
Traceback (most recent call last):
  File "setup.py", line 31, in <module>
    version=get_version(),
  File "setup.py", line 23, in get_version
    exec(version_file.read(), globals())
  File "<string>", line 23, in <module>
  File "/Users/me/Desktop/repos/impyute/impyute/__init__.py", line 23, in <module>
    from impyute.imputation.cs import mean
  File "/Users/me/Desktop/repos/impyute/impyute/imputation/cs/__init__.py", line 3, in <module>
    from .random import random
  File "/Users/me/Desktop/repos/impyute/impyute/imputation/cs/random.py", line 2, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

The issue is with how the __version__ is being maintained via get_version. It tries to load the impyute/__init__.py file and execute it via exec but it doesn't take in to account that packages may have not been installed yet.