cannot import name 'just_fix_windows_console' from 'colorama' #1492
Open
Description
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 problem- In a Jupyter Notebook:
import nevergrad as ng
Observed Results
I get the following error message:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/tmp/ipykernel_193577/2768283666.py in <module>
6 import matplotlib.pyplot as plt
7 import time
----> 8 import nevergrad as ng
~/.local/lib/python3.10/site-packages/nevergrad/__init__.py in <module>
6 from .common import typing as typing
7 from .parametrization import parameter as p
----> 8 from .optimization import optimizerlib as optimizers # busy namespace, likely to be simplified
9 from .optimization import families as families
10 from .optimization import callbacks as callbacks
~/.local/lib/python3.10/site-packages/nevergrad/optimization/__init__.py in <module>
5
6 from .base import Optimizer # abstract class, for type checking
----> 7 from . import optimizerlib
8 from .optimizerlib import registry as registry
~/.local/lib/python3.10/site-packages/nevergrad/optimization/optimizerlib.py in <module>
9 import warnings
10 import numpy as np
---> 11 from bayes_opt import UtilityFunction
12 from bayes_opt import BayesianOptimization
13 import nevergrad.common.typing as tp
~/.local/lib/python3.10/site-packages/bayes_opt/__init__.py in <module>
----> 1 from .bayesian_optimization import BayesianOptimization, Events
2 from .domain_reduction import SequentialDomainReductionTransformer
3 from .util import UtilityFunction
4 from .logger import ScreenLogger, JSONLogger
5 from .constraint import ConstraintModel
~/.local/lib/python3.10/site-packages/bayes_opt/bayesian_optimization.py in <module>
3 from bayes_opt.constraint import ConstraintModel
4
----> 5 from .target_space import TargetSpace
6 from .event import Events, DEFAULT_EVENTS
7 from .logger import _get_default_logger
~/.local/lib/python3.10/site-packages/bayes_opt/target_space.py in <module>
2
3 import numpy as np
----> 4 from .util import ensure_rng, NotUniqueError
5 from .util import Colours
6
~/.local/lib/python3.10/site-packages/bayes_opt/util.py in <module>
3 from scipy.stats import norm
4 from scipy.optimize import minimize
----> 5 from colorama import just_fix_windows_console
6
7
ImportError: cannot import name 'just_fix_windows_console' from 'colorama' (/usr/lib/python3/dist-packages/colorama/__init__.py)
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:
Based on the changelog for colorama, that function was added in the latest version of the library, 0.4.6.
I tried installing the latest version of colorama
, but received the same error message when trying to import.
Metadata
Assignees
Labels
No labels