Skip to content

Failed to install statsmodels 0.9.0 if numpy is not installed before #4635

@tamasgal

Description

@tamasgal

Our CI server discovered this issue in the fresh install stage. An example how to reproduce it is given below.

The workaround is obviously installing numpy first.

The main issue is, when running CI, people often use a single file (requirements.txt) to install the dependencies. I am not sure what's the exact way to define the order of the packages to install, but statsmodels seem to come before numpy (in our case), although numpy is at the top of the file.

░ tamasgal@greybox:~
░ 07:52:49 > pyenv virtualenv 3.6.4 statsmodels_test
Using base prefix '/Users/tamasgal/.pyenv/versions/3.6.4'
New python executable in /Users/tamasgal/.pyenv/versions/3.6.4/envs/statsmodels_test/bin/python3.6
Also creating executable in /Users/tamasgal/.pyenv/versions/3.6.4/envs/statsmodels_test/bin/python
Installing setuptools, pip, wheel...done.
Requirement already satisfied: setuptools in /Users/tamasgal/.pyenv/versions/3.6.4/envs/statsmodels_test/lib/python3.6/site-packages
Requirement already satisfied: pip in /Users/tamasgal/.pyenv/versions/3.6.4/envs/statsmodels_test/lib/python3.6/site-packages
░ tamasgal@greybox:~
░ 07:54:51 > pyenv shell statsmodels_test
░ tamasgal@greybox:~
░ 07:55:01 > pip install statsmodels
Collecting statsmodels
  Using cached https://files.pythonhosted.org/packages/67/68/eb3ec6ab61f97216c257edddb853cc174cd76ea44b365cf4adaedcd44482/statsmodels-0.9.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/n2/fpv312vd5xg91ncw_s5f1m5m0000gn/T/pip-install-azgq3_k_/statsmodels/setup.py", line 347, in <module>
        from numpy.distutils.misc_util import get_info
    ModuleNotFoundError: No module named 'numpy'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/fpv312vd5xg91ncw_s5f1m5m0000gn/T/pip-install-azgq3_k_/statsmodels/

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