Skip to content

0.8.0rc1 implicitly requires numpy to be pre-installed #3207

Closed

Description

@jwm

The get_info import in setup.py (https://github.com/statsmodels/statsmodels/blob/master/setup.py#L335) implicitly requires numpy to be installed before statsmodels.

Otherwise, statsmodels installation fails:

[jwm@hobbes:s002 ~> pip install statsmodels==0.8.0rc1
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting statsmodels==0.8.0rc1 (from -r requirements.txt (line 1))
  Using cached statsmodels-0.8.0rc1.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/8h/7_y8y9rx32jfrn52rl35l2080000gn/T/pip-build-fbiaSB/statsmodels/setup.py", line 330, in <module>
        from numpy.distutils.misc_util import get_info
    ImportError: No module named numpy.distutils.misc_util

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8h/7_y8y9rx32jfrn52rl35l2080000gn/T/pip-build-fbiaSB/statsmodels

This is especially problematic for applications that declare dependencies using a requirements.txt, since that file may include numpy, but it won't necessarily be completely installed before statsmodels.

This change was introduced in 0.8.0rc1 (8a1a0b9). scipy seems to have a reasonably elegant way of addressing this. If numpy isn't already present, it declares numpy as a setup dependency.

Activity

  1. josef-pkt commented on Sep 22, 2016

    @josef-pkt
    Member

    It looks like this would be solved by #3195
    I thought we do something similar to scipy already.

    However, I'm not really up to date on how our setup.py and requirements currently work.

  2. bpeterman commented on Dec 15, 2016

    @bpeterman

    I'm also having an issue with this when declaring dependencies using a requirements.txt

  3. ciarancourtney commented on Feb 13, 2017

    @ciarancourtney

    This appears to be fixed in 0.8.0

    $ test/bin/pip install statsmodels
    Collecting statsmodels
      Using cached statsmodels-0.8.0-cp35-cp35m-manylinux1_x86_64.whl
    Collecting scipy (from statsmodels)
      Using cached scipy-0.18.1-cp35-cp35m-manylinux1_x86_64.whl
    Collecting pandas (from statsmodels)
      Using cached pandas-0.19.2-cp35-cp35m-manylinux1_x86_64.whl
    Collecting patsy (from statsmodels)
      Using cached patsy-0.4.1-py2.py3-none-any.whl
    Collecting numpy>=1.7.0 (from pandas->statsmodels)
      Downloading numpy-1.12.0-cp35-cp35m-manylinux1_x86_64.whl (16.8MB)
        100% |████████████████████████████████| 16.8MB 54kB/s 
    Collecting python-dateutil>=2 (from pandas->statsmodels)
      Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
    Collecting pytz>=2011k (from pandas->statsmodels)
      Using cached pytz-2016.10-py2.py3-none-any.whl
    Requirement already satisfied: six in ./test/lib/python3.5/site-packages (from patsy->statsmodels)
    Installing collected packages: scipy, numpy, python-dateutil, pytz, pandas, patsy, statsmodels
    Successfully installed numpy-1.12.0 pandas-0.19.2 patsy-0.4.1 python-dateutil-2.6.0 pytz-2016.10 scipy-0.18.1 statsmodels-0.8.0`
    
  4. jwm commented on Feb 13, 2017

    @jwm
    Author

    Hm, not seeing that work with a fresh virtualenv and statsmodels 0.8.0:

    (foo)[jwm@hobbes:s000 ~> virtualenv foo
    New python executable in foo/bin/python2.7
    Also creating executable in foo/bin/python
    Installing setuptools, pip, wheel...done.
    (foo)[jwm@hobbes:s000 ~> . foo/bin/activate
    (foo)[jwm@hobbes:s000 ~> pip list | grep -i numpy
    You are using pip version 7.1.0, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    (foo)[jwm@hobbes:s000 ~> pip install statsmodels==0.8.0
    You are using pip version 7.1.0, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    Collecting statsmodels==0.8.0
      Using cached statsmodels-0.8.0.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 20, in <module>
          File "/private/var/folders/8h/7_y8y9rx32jfrn52rl35l2080000gn/T/pip-build-RuoYtU/statsmodels/setup.py", line 335, in <module>
            from numpy.distutils.misc_util import get_info
        ImportError: No module named numpy.distutils.misc_util
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8h/7_y8y9rx32jfrn52rl35l2080000gn/T/pip-build-RuoYtU/statsmodels
    
  5. ciarancourtney commented on Feb 13, 2017

    @ciarancourtney

    Looks like the problem is still prevalent if building from src. There are wheels on pypi for python27 on linux/Mac 64bit, maybe you are 32bit or using windows?

    0.8.0rc1 probably failed for me because only windows wheels were available https://pypi.python.org/pypi/statsmodels/0.8.0rc1

  6. markyen commented on Jun 23, 2017

    @markyen

    I encountered this problem when attempting to install the latest version of numpy and statsmodels from the public pypi mirror:

    $ virtualenv env
    New python executable in env/bin/python2
    Also creating executable in env/bin/python
    Installing setuptools, pip...done.
    $ source env/bin/activate
    $ echo "numpy
    statsmodels" > requirements.txt
    $ pip install -i https://pypi.python.org/simple -r requirements.txt
    Downloading/unpacking numpy (from -r requirements.txt (line 1))
    Creating supposed download cache at /home/user/.pip/cache
      Storing download in cache at ./.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F05%2F84%2F0feb999c05f252af50a5fbc463268044feda92cdaad8cb0d0a6073d76057%2Fnumpy-1.13.0.zip
      Running setup.py (path:/tmp/pip-build-SBFo6g/numpy/setup.py) egg_info for package numpy
        Running from numpy source directory.
        /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
          warnings.warn(msg)
        
        warning: no previously-included files matching '*.pyc' found anywhere in distribution
        warning: no previously-included files matching '*.pyo' found anywhere in distribution
        warning: no previously-included files matching '*.pyd' found anywhere in distribution
    Downloading/unpacking statsmodels (from -r requirements.txt (line 2))
      Storing download in cache at ./.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F72%2F16%2Fd7e7a70fc8ca3cc0d783a66e902a7adf80a810695c357cd48bb22c82451a%2Fstatsmodels-0.8.0.tar.gz
      Running setup.py (path:/tmp/pip-build-SBFo6g/statsmodels/setup.py) egg_info for package statsmodels
        Traceback (most recent call last):
          File "<string>", line 17, in <module>
          File "/tmp/pip-build-SBFo6g/statsmodels/setup.py", line 335, in <module>
            from numpy.distutils.misc_util import get_info
        ImportError: No module named numpy.distutils.misc_util
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
    
      File "<string>", line 17, in <module>
    
      File "/tmp/pip-build-SBFo6g/statsmodels/setup.py", line 335, in <module>
    
        from numpy.distutils.misc_util import get_info
    
    ImportError: No module named numpy.distutils.misc_util
    
    ----------------------------------------
    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-SBFo6g/statsmodels
    Storing debug log for failure in /home/user/.pip/pip.log
    

    Older versions of pip appear to have trouble installing from wheels. The run above was using pip 1.5.6. Running pip install --upgrade pip fixed the issue for me, because it was then able to install from the wheel properly.

    For those stuck on older versions of pip, or on platforms without wheels available, are there plans to merge #3195? It looks like that would fix this issue for everyone.

  7. KFoxder commented on Sep 30, 2017

    @KFoxder

    Is anyone planning on fixing this?

  8. josef-pkt commented on Sep 30, 2017

    @josef-pkt
    Member

    I'm waiting for an "all clear to merge" for #3195
    I'm not an expert in this area anymore

  9. josiahjohnston commented on May 16, 2018

    @josiahjohnston

    I'm getting this bug in v0.9.0, running python 2.7.12, pip 10.0.1, Ubuntu 16.04. Downgrading to v0.8.0 addresses it and is my current workaround.

    josiah@msmproc2:~/src/statsmodels.bug$ virtualenv venv --no-site-packages
    Running virtualenv with interpreter /usr/bin/python2
    New python executable in /home/josiah/src/statsmodels.bug/venv/bin/python2
    Also creating executable in /home/josiah/src/statsmodels.bug/venv/bin/python
    Installing setuptools, pkg_resources, pip, wheel...done.
    josiah@msmproc2:~/src/statsmodels.bug$ source venv/bin/activate
    (venv) josiah@msmproc2:~/src/statsmodels.bug$ python --version
    Python 2.7.12
    (venv) josiah@msmproc2:~/src/statsmodels.bug$ pip --version
    pip 10.0.1 from /home/josiah/src/statsmodels.bug/venv/local/lib/python2.7/site-packages/pip (python 2.7)
    (venv) josiah@msmproc2:~/src/statsmodels.bug$ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 16.04.4 LTS
    Release:	16.04
    Codename:	xenial
    (venv) josiah@msmproc2:~/src/statsmodels.bug$ pip install statsmodels
    Collecting statsmodels
      Downloading https://files.pythonhosted.org/packages/67/68/eb3ec6ab61f97216c257edddb853cc174cd76ea44b365cf4adaedcd44482/statsmodels-0.9.0.tar.gz (12.7MB)
        100% |████████████████████████████████| 12.7MB 1.8MB/s 
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-RA_ly7/statsmodels/setup.py", line 347, in <module>
            from numpy.distutils.misc_util import get_info
        ImportError: No module named numpy.distutils.misc_util
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-RA_ly7/statsmodels/
    
  10. josef-pkt commented on May 16, 2018

    @josef-pkt
    Member

    @josiahjohnston The workaround should be to install numpy before installing pypi.
    I don't think there were any changes to this compared to 0.8.

  11. josiahjohnston commented on May 16, 2018

    @josiahjohnston

    That doesn't work for me. My actual use case is including ggplot as a 'install_requires' in my setup.py, and ggplot lists statsmodels as a dependency. This fails:

    from setuptools import setup, find_packages
    setup(
    	name='statsmodels.test',
    	install_requires=[
    		'ggplot'
    	]
    )
    

    This fails too (I tried it before my initial post):

    from setuptools import setup, find_packages
    setup(
    	name='statsmodels.test',
    	install_requires=[
    		'numpy',
    		'ggplot'
    	]
    )
    

    Moving ggplot to after numpy in the list failed to fix this problem because numpy was downloaded but not fully installed (and available) in the virtual environment before your setup.py executes and requests numpy.

    This works for me:

    from setuptools import setup, find_packages
    setup(
    	name='statsmodels.test',
    	install_requires=[
    		'statsmodels!=0.9.0',
    		# Or 'statsmodels==0.8.0',
    		'ggplot'
    	]
    )
    

    The standard simple solution is to avoid importing any dependencies in your setup.py, but I'm guessing you had very good reasons for breaking that guideline. If numpy is optional, you could wrap its import in a try: statement (a PR I offered other developers who had a similar problem as you).

    I personally don't know of another way to let you import dependencies in setup.py without breaking pip dependency management. Unfortunately, your workaround of manual non-standard installation is a deal breaker in my applications. If you find another solution for this chicken-and-egg situation, I'd be interested to learning it. This is the second package I've encountered with this type of installation error, and I'm expecting to find more in the future.

    Best of luck!

  12. josef-pkt commented on May 17, 2018

    @josef-pkt
    Member

    My problem is that I have no idea how pip works.

    We, or better, pip install seems to have two steps:

    • discovery of dependencies: during collection we don't need numpy and we could just run check_dependency_versions to see what's already installed and populate the "requires" if missing.
    • for cythonizing for sdist and for compiling we need numpy and scipy, so we can create numpy and scipy compatible C files and binary files.

    The second steps are currently in the main setup.py module code and break if numpy is not installed. If we know what triggers cythonizing and compilation, then we could hide the extension definition in a function and avoid calling that part during the discovery/collection part.

    But I have no idea how to do that. Based on the comments, #3195 does not handle this correctly yet.
    And I have no idea why this works with 0.8 if it doesn't work with 0.9.

  13. josiahjohnston commented on May 17, 2018

    @josiahjohnston

    Just checked my terminal. Looks like statsmodels-0.8.0 came from a wheel

    ...
    Collecting statsmodels==0.8.0
      Downloading https://files.pythonhosted.org/packages/a2/2a/0bb4e9e0e0f2bedde21602a2ac89164fa40814b1d3d16c1a7918e81977e9/statsmodels-0.8.0-cp27-cp27mu-manylinux1_x86_64.whl (6.2MB)
        100% |████████████████████████████████| 6.2MB 4.0MB/s 
    Collecting pandas (from statsmodels==0.8.0)
    ... # Continues till success
    

    But statsmodels-0.9.0 comes from a tarball which presumably needs to be compiled.

    ...
    Collecting statsmodels (from ggplot->msm-ml==0.1)
      Downloading https://files.pythonhosted.org/packages/67/68/eb3ec6ab61f97216c257edddb853cc174cd76ea44b365cf4adaedcd44482/statsmodels-0.9.0.tar.gz (12.7MB)
        100% |████████████████████████████████| 12.7MB 2.0MB/s 
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-s5nuEi/statsmodels/setup.py", line 347, in <module>
            from numpy.distutils.misc_util import get_info
        ImportError: No module named numpy.distutils.misc_util
    

    Maybe precompiling wheels for the most common platforms can be a workaround?

  14. josef-pkt commented on May 17, 2018

    @josef-pkt
    Member

    Linux and Apple wheels should be coming over the next days.
    Wheels don't have the setup.py importing numpy problem, but we have a separate issue that wheels don't specify requirements, i.e. pandas and patsy still have to be separately specified as requirement which in turn should also add numpy and scipy. #4638

  15. added 4 commits that reference this issue on Aug 21, 2018
    708d390
    72cb33b
    a0c5373
    6b0302f
  16. zengqingfu1442 commented on Aug 2, 2021

    @zengqingfu1442

    Does this issue fixed already? I still have this issue when use pip to install statsmodels==0.10.0 on alpine:3.14.

    bash-5.1# python2.7 -m pip install statsmodels==0.10.0
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Collecting statsmodels==0.10.0
      Downloading statsmodels-0.10.0.tar.gz (14.0 MB)
         |████████████████████████████████| 14.0 MB 6.0 MB/s 
    
    
    
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Nu3H9h/statsmodels/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Nu3H9h/statsmodels/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-IdPys2
             cwd: /tmp/pip-install-Nu3H9h/statsmodels/
        Complete output (52 lines):
        DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
        DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
          ERROR: Command errored out with exit status 1:
           command: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-hU3nWo/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-hU3nWo/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ZW4H1H
               cwd: /tmp/pip-wheel-hU3nWo/scipy/
          Complete output (7 lines):
          Traceback (most recent call last):
            File "<string>", line 1, in <module>
            File "/tmp/pip-wheel-hU3nWo/scipy/setup.py", line 492, in <module>
              setup_package()
            File "/tmp/pip-wheel-hU3nWo/scipy/setup.py", line 468, in setup_package
              from numpy.distutils.core import setup
          ImportError: No module named numpy.distutils.core
          ----------------------------------------
          ERROR: Failed building wheel for scipy
          ERROR: Command errored out with exit status 1:
           command: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-hU3nWo/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-hU3nWo/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
               cwd: /tmp/pip-wheel-hU3nWo/scipy
          Complete output (9 lines):
        
          `setup.py clean` is not supported, use one of the following instead:
        
            - `git clean -xdf` (cleans all files)
            - `git clean -Xdf` (cleans all versioned files, doesn't touch
                                files that aren't checked into the git repo)
        
          Add `--force` to your command to use it anyway if you must (unsupported).
        
          ----------------------------------------
          ERROR: Failed cleaning build dir for scipy
        ERROR: Failed to build one or more wheels
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-Nu3H9h/statsmodels/setup.py", line 346, in <module>
            data_files=[('', ['LICENSE.txt', 'setup.cfg'])]
          File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 161, in setup
            _install_setup_requires(attrs)
          File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 156, in _install_setup_requires
            dist.fetch_build_eggs(dist.setup_requires)
          File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
            replace_conflicting=True,
          File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
            replace_conflicting=replace_conflicting
          File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
            return self.obtain(req, installer)
          File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
            return installer(requirement)
          File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
            return fetch_build_egg(self, req)
          File "/usr/lib/python2.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
            raise DistutilsError(str(e))
        distutils.errors.DistutilsError: Command '['/usr/bin/python2.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpH31Aqa', '--quiet', 'scipy>=0.18']' returned non-zero exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
    
  17. bashtage commented on Aug 2, 2021

    @bashtage
    Member

    0.8 is complutely unsupported. This has not been an issue for a number of releases, and we always recommend upgrading to the latest release.

  18. zengqingfu1442 commented on Aug 2, 2021

    @zengqingfu1442

    I directly use pip to install statsmodels==0.10.0 on alpine:3.14 but failed.

    bash-5.1# cat /etc/os-release 
    NAME="Alpine Linux"
    ID=alpine
    VERSION_ID=3.14.0
    PRETTY_NAME="Alpine Linux v3.14"
    HOME_URL="https://alpinelinux.org/"
    BUG_REPORT_URL="https://bugs.alpinelinux.org/"
    
  19. bashtage commented on Aug 2, 2021

    @bashtage
    Member

    Try statsmodels 0.12.2.

  20. zengqingfu1442 commented on Aug 3, 2021

    @zengqingfu1442

    But the latest version for python 2.7 is 0.11.0.

    bash-5.1# python2.7 -m pip install numpy
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Processing /root/.cache/pip/wheels/fe/49/d9/dbd8037d1f7b1672ebcdba0c75f1b7000d9e888a33af294c35/numpy-1.16.6-cp27-cp27mu-linux_x86_64.whl
    Installing collected packages: numpy
    Successfully installed numpy-1.16.6
    bash-5.1# python2.7 -m pip install statsmodels
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Collecting statsmodels
      Using cached statsmodels-0.11.0.tar.gz (15.4 MB)
      Installing build dependencies ... error
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python2.7 /usr/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-A_gmtq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.14.5; python_version=='"'"'3.5'"'"'' 'numpy==1.14.5; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.0'
           cwd: None
      Complete output (311 lines):
      DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
      Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.7"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.8"' don't match your environment
      Collecting setuptools
        Using cached setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
      Collecting wheel
        Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
      Collecting cython>=0.29.14
        Using cached Cython-0.29.24-py2.py3-none-any.whl (979 kB)
      Collecting scipy>=1.0
        Using cached scipy-1.2.3.tar.gz (23.3 MB)
      Building wheels for collected packages: scipy
        Building wheel for scipy (setup.py): started
        Building wheel for scipy (setup.py): finished with status 'error'
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-iHoKxH
             cwd: /tmp/pip-install-qjbcVy/scipy/
        Complete output (127 lines):
        Running from scipy source directory.
        lapack_opt_info:
        lapack_mkl_info:
        customize UnixCCompiler
          libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE
      
        openblas_lapack_info:
        customize UnixCCompiler
        customize UnixCCompiler
          libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE
      
        openblas_clapack_info:
        customize UnixCCompiler
        customize UnixCCompiler
          libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE
      
        atlas_3_10_threads_info:
        Setting PTATLAS=ATLAS
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries tatlas,tatlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib
        customize UnixCCompiler
          libraries tatlas,tatlas not found in /usr/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib/
        customize UnixCCompiler
          libraries tatlas,tatlas not found in /usr/lib/
        <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
          NOT AVAILABLE
      
        atlas_3_10_info:
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries satlas,satlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib
        customize UnixCCompiler
          libraries satlas,satlas not found in /usr/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib/
        customize UnixCCompiler
          libraries satlas,satlas not found in /usr/lib/
        <class 'numpy.distutils.system_info.atlas_3_10_info'>
          NOT AVAILABLE
      
        atlas_threads_info:
        Setting PTATLAS=ATLAS
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib
        customize UnixCCompiler
          libraries ptf77blas,ptcblas,atlas not found in /usr/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib/
        customize UnixCCompiler
          libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
        <class 'numpy.distutils.system_info.atlas_threads_info'>
          NOT AVAILABLE
      
        atlas_info:
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries f77blas,cblas,atlas not found in /usr/local/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib
        customize UnixCCompiler
          libraries f77blas,cblas,atlas not found in /usr/lib
        customize UnixCCompiler
          libraries lapack_atlas not found in /usr/lib/
        customize UnixCCompiler
          libraries f77blas,cblas,atlas not found in /usr/lib/
        <class 'numpy.distutils.system_info.atlas_info'>
          NOT AVAILABLE
      
        accelerate_info:
          NOT AVAILABLE
      
        /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
            Atlas (http://math-atlas.sourceforge.net/) libraries not found.
            Directories to search for the libraries can be specified in the
            numpy/distutils/site.cfg file (section [atlas]) or by setting
            the ATLAS environment variable.
          self.calc_info()
        lapack_info:
        customize UnixCCompiler
          libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE
      
        /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
            Lapack (http://www.netlib.org/lapack/) libraries not found.
            Directories to search for the libraries can be specified in the
            numpy/distutils/site.cfg file (section [lapack]) or by setting
            the LAPACK environment variable.
          self.calc_info()
        lapack_src_info:
          NOT AVAILABLE
      
        /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
            Lapack (http://www.netlib.org/lapack/) sources not found.
            Directories to search for the sources can be specified in the
            numpy/distutils/site.cfg file (section [lapack_src]) or by setting
            the LAPACK_SRC environment variable.
          self.calc_info()
          NOT AVAILABLE
      
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 492, in <module>
            setup_package()
          File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 488, in setup_package
            setup(**metadata)
          File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 137, in setup
            config = configuration()
          File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 395, in configuration
            raise NotFoundError(msg)
        numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
        ----------------------------------------
        ERROR: Failed building wheel for scipy
        Running setup.py clean for scipy
        ERROR: Command errored out with exit status 1:
         command: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
             cwd: /tmp/pip-install-qjbcVy/scipy
        Complete output (9 lines):
      
        `setup.py clean` is not supported, use one of the following instead:
      
          - `git clean -xdf` (cleans all files)
          - `git clean -Xdf` (cleans all versioned files, doesn't touch
                              files that aren't checked into the git repo)
      
        Add `--force` to your command to use it anyway if you must (unsupported).
      
        ----------------------------------------
        ERROR: Failed cleaning build dir for scipy
      Failed to build scipy
      Installing collected packages: setuptools, wheel, cython, scipy
          Running setup.py install for scipy: started
          Running setup.py install for scipy: finished with status 'error'
          ERROR: Command errored out with exit status 1:
           command: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8DLdMS/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-A_gmtq/overlay --compile --install-headers /tmp/pip-build-env-A_gmtq/overlay/include/python2.7/scipy
               cwd: /tmp/pip-install-qjbcVy/scipy/
          Complete output (136 lines):
      
          Note: if you need reliable uninstall behavior, then install
          with pip instead of using `setup.py install`:
      
            - `pip install .`       (from a git repo or downloaded source
                                     release)
            - `pip install scipy`   (last SciPy release on PyPI)
      
      
          Running from scipy source directory.
          lapack_opt_info:
          lapack_mkl_info:
          customize UnixCCompiler
            libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
            NOT AVAILABLE
      
          openblas_lapack_info:
          customize UnixCCompiler
          customize UnixCCompiler
            libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
            NOT AVAILABLE
      
          openblas_clapack_info:
          customize UnixCCompiler
          customize UnixCCompiler
            libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
            NOT AVAILABLE
      
          atlas_3_10_threads_info:
          Setting PTATLAS=ATLAS
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries tatlas,tatlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib
          customize UnixCCompiler
            libraries tatlas,tatlas not found in /usr/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib/
          customize UnixCCompiler
            libraries tatlas,tatlas not found in /usr/lib/
          <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
            NOT AVAILABLE
      
          atlas_3_10_info:
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries satlas,satlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib
          customize UnixCCompiler
            libraries satlas,satlas not found in /usr/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib/
          customize UnixCCompiler
            libraries satlas,satlas not found in /usr/lib/
          <class 'numpy.distutils.system_info.atlas_3_10_info'>
            NOT AVAILABLE
      
          atlas_threads_info:
          Setting PTATLAS=ATLAS
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib
          customize UnixCCompiler
            libraries ptf77blas,ptcblas,atlas not found in /usr/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib/
          customize UnixCCompiler
            libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
          <class 'numpy.distutils.system_info.atlas_threads_info'>
            NOT AVAILABLE
      
          atlas_info:
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries f77blas,cblas,atlas not found in /usr/local/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib
          customize UnixCCompiler
            libraries f77blas,cblas,atlas not found in /usr/lib
          customize UnixCCompiler
            libraries lapack_atlas not found in /usr/lib/
          customize UnixCCompiler
            libraries f77blas,cblas,atlas not found in /usr/lib/
          <class 'numpy.distutils.system_info.atlas_info'>
            NOT AVAILABLE
      
          accelerate_info:
            NOT AVAILABLE
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
              Atlas (http://math-atlas.sourceforge.net/) libraries not found.
              Directories to search for the libraries can be specified in the
              numpy/distutils/site.cfg file (section [atlas]) or by setting
              the ATLAS environment variable.
            self.calc_info()
          lapack_info:
          customize UnixCCompiler
            libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
            NOT AVAILABLE
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
              Lapack (http://www.netlib.org/lapack/) libraries not found.
              Directories to search for the libraries can be specified in the
              numpy/distutils/site.cfg file (section [lapack]) or by setting
              the LAPACK environment variable.
            self.calc_info()
          lapack_src_info:
            NOT AVAILABLE
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
              Lapack (http://www.netlib.org/lapack/) sources not found.
              Directories to search for the sources can be specified in the
              numpy/distutils/site.cfg file (section [lapack_src]) or by setting
              the LAPACK_SRC environment variable.
            self.calc_info()
            NOT AVAILABLE
      
          Traceback (most recent call last):
            File "<string>", line 1, in <module>
            File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 492, in <module>
              setup_package()
            File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 488, in setup_package
              setup(**metadata)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 137, in setup
              config = configuration()
            File "/tmp/pip-install-qjbcVy/scipy/setup.py", line 395, in configuration
              raise NotFoundError(msg)
          numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
          ----------------------------------------
      ERROR: Command errored out with exit status 1: /usr/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qjbcVy/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-8DLdMS/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-A_gmtq/overlay --compile --install-headers /tmp/pip-build-env-A_gmtq/overlay/include/python2.7/scipy Check the logs for full command output.
      ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/bin/python2.7 /usr/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-A_gmtq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.29.14' 'numpy==1.14.5; python_version=='"'"'3.5'"'"'' 'numpy==1.14.5; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' 'numpy==1.17.5; python_version>='"'"'3.8'"'"'' 'scipy>=1.0' Check the logs for full command output.
    
  21. bashtage commented on Aug 3, 2021

    @bashtage
    Member

    There is no support for 2.7 available from statsmodels developers. If you need 2.7 you will need to find an alternative source of support. We strongly recommend that anyone using statsmodels, or numerical python in general, uses 3.8 or newer.

  22. zengqingfu1442 commented on Aug 3, 2021

    @zengqingfu1442

    @bashtage But I try to use python3.9 -m pip install statsmodels==0.12.2 on alpine:3.14, it still failed.

  23. bashtage commented on Aug 3, 2021

    @bashtage
    Member

    Don't use alpine? IIRC alpine can't use standard wheels. I suspect you are having problems building NumPy and especially SciPy which are requirements. Can you get NumPy, SciPy, pandas and Cython all installed in your python 3.9? If you, you can install statsmodels from source.

  24. bashtage commented on Aug 3, 2021

    @bashtage
    Member
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions