diff --git a/skopt/__init__.py b/skopt/__init__.py index 88f9b9b9f..b98a981c5 100644 --- a/skopt/__init__.py +++ b/skopt/__init__.py @@ -45,7 +45,6 @@ def f(x): Run the tests by executing `pytest` in the top level directory. """ -import sys try: # This variable is injected in the __builtins__ by the build # process. It is used to enable importing subpackages of sklearn when @@ -73,8 +72,8 @@ def f(x): # __version__ = "0.7" - if __SKOPT_SETUP__: + import sys sys.stderr.write('Partial import of skopt during the build process.\n') # We are not importing the rest of scikit-optimize during the build # process, as it may not be compiled yet