Browse Source

Bootstrap numpy installation.

lon0
Ben Bonenfant 6 years ago
parent
commit
53b08c40dc
  1. 8
      setup.py

8
setup.py

@ -3,6 +3,14 @@ import sys
import setuptools import setuptools
import socket import socket
# Bootstrap a numpy installation before trying to import it.
import imp
try:
imp.find_module('numpy')
except ImportError:
import subprocess
subprocess.call([sys.executable, '-m', 'pip', 'install', 'numpy'])
if not socket.gethostname().startswith("cheyenne"): if not socket.gethostname().startswith("cheyenne"):
import numpy.distutils.core import numpy.distutils.core
else: else:

Loading…
Cancel
Save