我想用Facebook的预言家,然而当我试图创建一个模型时:
model = prt.Prophet(stan_backend='CMDSTANPY')
它会出现这样的错误:
Traceback (most recent call last):
File "C:\Users\UserName\IdeaProjects\station-simulate\stcd-predict.py", line 24, in <module>
model = prt.Prophet(stan_backend='CMDSTANPY')
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\forecaster.py", line 142, in __init__
self._load_stan_backend(stan_backend)
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\forecaster.py", line 153, in _load_stan_backend
self.stan_backend = StanBackendEnum.get_backend_class(stan_backend)()
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\models.py", line 67, in __init__
super().__init__()
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\models.py", line 23, in __init__
self.model = self.load_model()
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\models.py", line 79, in load_model
return cmdstanpy.CmdStanModel(exe_file=model_file)
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\cmdstanpy\model.py", line 192, in __init__
do_command(['where.exe', 'tbb.dll'], fd_out=None)
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\cmdstanpy\utils\command.py", line 53, in do_command
line = proc.stdout.readline()
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte
如果不使用stan_backend='CMDSTANPY'
:
Traceback (most recent call last):
File "C:\Users\k6789\IdeaProjects\station-simulate\stcd-predict.py", line 24, in <module>
model = prt.Prophet()
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\forecaster.py", line 141, in __init__
self._load_stan_backend(stan_backend)
File "C:\ProgramData\Anaconda3\envs\my1stconda\lib\site-packages\prophet\forecaster.py", line 154, in _load_stan_backend
logger.debug("Loaded stan backend: %s", self.stan_backend.get_type())
AttributeError: 'Prophet' object has no attribute 'stan_backend'
我用微曼巴蛇重新设置了先知,但它没有效果。
这怎么解决?
1条答案
按热度按时间rkttyhzu1#
现在我换了另一台电脑,创建了一个新的康达环境,解决了这个问题。