Skip to content

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

Closed

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/

Activity

  1. elboerto commented on May 15, 2018

    @elboerto

    Same here. There seems to be an numpy import within the setup.py. Installing from a requirements.txt on a machine without numpy fails.

  2. thequackdaddy commented on May 15, 2018

    @thequackdaddy
    Member

    xref #3195

  3. Thomasillo commented on May 17, 2018

    @Thomasillo

    Same here

  4. bashtage commented on Aug 21, 2018

    @bashtage
    Member

    This fixed in #4871, although it hasn't been accepted.

  5. added a commit that references this issue on Aug 21, 2018
    708d390
  6. tplude commented on Aug 21, 2018

    @tplude

    I'm also experiencing this issue

  7. added 3 commits that reference this issue on Aug 22, 2018
    72cb33b
    a0c5373
    6b0302f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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