Skip to content

Commit 7476d9d

Browse files
gregglindwesm
authored andcommitted
BLD: #517 friendlier setup message with no numpy
1 parent 864aba3 commit 7476d9d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232
'install_requires': ['python-dateutil < 2','numpy'],
3333
}
3434

35-
import numpy as np
35+
try:
36+
import numpy as np
37+
except ImportError:
38+
nonumpy_msg = ("# numpy needed to finish setup. run:\n\n"
39+
"pip install numpy \n# or easy_install numpy\n")
40+
print nonumpy_msg
41+
import sys
42+
sys.exit()
3643

3744
# from numpy.distutils.core import setup
3845

0 commit comments

Comments
 (0)