import emukit successfully,but others SyntaxError
AmosJoseph opened this issue · 2 comments
import emukit
from emukit.examples.gp_bayesian_optimization.single_objective_bayesian_optimization import GPBayesianOptimization
SyntaxError: ('invalid syntax', ('C:\Users\Apple1\AppData\Local\Programs\Python\Python37\Lib\site-packages\emukit\examples\gp_bayesian_optimization\single_objective_bayesian_optimization.py', 24, 38, ' def init(self, variables_list: list, X: np.array, Y: np.array, noiseless: bool = False,\n'))
from emukit.core.loop import UserFunctionResult
File "C:\Users\Apple1\AppData\Local\Programs\Python\Python37\Lib\site-packages\emukit\core_init_.py", line 4, in
from .categorical_parameter import CategoricalParameter # noqa: F401
SyntaxError: ('invalid syntax', ('C:\Users\Apple1\AppData\Local\Programs\Python\Python37\Lib\site-packages\emukit\core\categorical_parameter.py', 14, 28, ' def init(self, name: str, encoding: Encoding):\n'))
from emukit.core import ParameterSpace, ContinuousParameter
File "C:\Users\Apple1\AppData\Local\Programs\Python\Python37\Lib\site-packages\emukit\core_init_.py", line 4, in
from .categorical_parameter import CategoricalParameter # noqa: F401
SyntaxError: ('invalid syntax', ('C:\Users\Apple1\AppData\Local\Programs\Python\Python37\Lib\site-packages\emukit\core\categorical_parameter.py', 14, 28, ' def init(self, name: str, encoding: Encoding):\n'))
Excuse me, what is wrong,how to handle this problem?
Best!
I am not sure, to be honest. It looks more like something wrong with your Python installation rather than emukit. First thing that comes to mind is type hints, but they were introduced in python 3.5 and you seem to be running 3.7.
Can you get a clean python installation and try again?
Closing this, as it's clearly not Emukit (all our builds pass, and syntax error like that would fail them instantly).