Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Importing GPyOpt causes matplotlib import #197

Open
apaleyes opened this issue Sep 17, 2018 · 0 comments
Open

Importing GPyOpt causes matplotlib import #197

apaleyes opened this issue Sep 17, 2018 · 0 comments

Comments

@apaleyes
Copy link
Collaborator

Because of the chain of imports put in __init__.py files, when someone tries to import GPyOpt they end up importing matplotlib, even if they have no intention of doing any plotting. This needs to be fixed.

Minimal steps to reproduce:

  1. Create a fresh empty virtual env, activate it. Don't use Anaconda and such
virtualenv gpyopt-test
source gpyopt-test/bin/activate
  1. Install GPyOpt only
    pip install GpyOpt
  2. Import GPyOpt
    python -c "import GPyOpt"
  3. Observe the error
    ModuleNotFoundError: No module named 'matplotlib'

Proper way to fix this would be to clean up imports done by default, as well as to consider if matplotlib needs to become a hard dependency

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant