10000 Cannot run tests after `python setup.py build_ext -i` · Issue #6569 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Cannot run tests after python setup.py build_ext -i #6569
Closed
@wackywendell

Description

@wackywendell

Here is what I mean:

$ git clean -xdf
$ python setup.py build_ext -i
Running from numpy source directory.
Cythonizing sources
[... lots of building, completes successfully ...]
$ $ ./runtests.py
Building, see build.log...
Running from numpy source directory.
Traceback (most recent call last):
  File "setup.py", line 263, in <module>
    setup_package()
  File "setup.py", line 247, in setup_package
    from numpy.distutils.core import setup
  File "/home/wendell/code/numpy/numpy/distutils/__init__.py", line 21, in <module>
    from numpy.testing import Tester
  File "/home/wendell/code/numpy/numpy/testing/__init__.py", line 14, in <module>
    from .utils import *
  File "/home/wendell/code/numpy/numpy/testing/utils.py", line 17, in <module>
    from numpy.core import float32, empty, arange, array_repr, ndarray
  File "/home/wendell/code/numpy/numpy/core/__init__.py", line 59, in <module>
    test = Tester().test
  File "/home/wendell/code/numpy/numpy/testing/nosetester.py", line 180, in __init__
    if raise_warnings is None and '.dev0' in np.__version__:
AttributeError: module 'numpy' has no attribute '__version__'

Build failed!

The issue is pretty clear:

58C0 When numpy/__init__.py is loaded, under some conditions it will not set the __version__ variable; these conditions occur when you do not use a virtualenv or python setup.py install, and just try and run runtests.py. After 7b438fa (PR), nosetester.py tries to access this __version__ variable, which doesn't exist and so it crashes.

CC @rgommers @charris?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0