Open kilianmuller opened 1 year ago
I managed to fix the issue by downgrading colorama
from version 0.4.6 to 0.4.4, and bayesian_optimization
from version 1.4.2 to 1.4.0:
pip3 install bayesian_optimization==1.4.0
pip3 install colorama==0.4.4
Hi I also got this error message. Could anyone help me how to fix it?
bayesian_optimization==1.4.1
colorama==0.4.4
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[13], line 22
20 import os
21 #import BayesianOptimization
---> 22 from bayes_opt import BayesianOptimization, UtilityFunction
23 #from bayes_opt import BayesianOptimization
24 from colorama import Fore
File ~/.local/lib/python3.9/site-packages/bayes_opt/__init__.py:1
----> 1 from .bayesian_optimization import BayesianOptimization, Events
2 from .domain_reduction import SequentialDomainReductionTransformer
3 from .util import UtilityFunction
File ~/.local/lib/python3.9/site-packages/bayes_opt/bayesian_optimization.py:5
1 import warnings
3 from bayes_opt.constraint import ConstraintModel
----> 5 from .target_space import TargetSpace
6 from .event import Events, DEFAULT_EVENTS
7 from .logger import _get_default_logger
File ~/.local/lib/python3.9/site-packages/bayes_opt/target_space.py:4
1 import warnings
3 import numpy as np
----> 4 from .util import ensure_rng, NotUniqueError
5 from .util import Colours
8 def _hashable(x):
File ~/.local/lib/python3.9/site-packages/bayes_opt/util.py:5
3 from scipy.stats import norm
4 from scipy.optimize import minimize
----> 5 from colorama import just_fix_windows_console
8 def acq_max(ac, gp, y_max, bounds, random_state, constraint=None, n_warmup=10000, n_iter=10):
9 """
10 A function to find the maximum of the acquisition function
11
(...)
44 :return: x_max, The arg max of the acquisition function.
45 """
ImportError: cannot import name 'just_fix_windows_console' from 'colorama' (/home/gridsan/ychen1/.local/lib/python3.9/site-packages/colorama/__init__.py)
Hi, I have just installed
nevergrad
, but am unable to import it.This is on Linux.
Steps to reproduce
pip3 install nevergrad
-> installs without a problemimport nevergrad as ng
Observed Results
I get the following error message:
I did find this related message on StackOverflow: https://stackoverflow.com/questions/74654425/why-i-receive-importerror-cannot-import-name-just-fix-windows-console-from-c In it they say:
I tried installing the latest version of
colorama
, but received the same error message when trying to import.