Ошибка при установке fbprophet

Я пытаюсь установить fbprophet на свой ПК с Windows 10. Я установил pystan, а затем fbprophet, но во время выполнения кода я получаю сообщение об ошибке - объект 'StanModel' не имеет атрибута 'fit_class'

Я попытался проверить много онлайн-материалов, чтобы решить эту проблему. Я удалил pystan и fbprophet и переустановил версии - pip install pystan==2.17 pip install fbprophet==0.2

Но я все еще получаю ту же ошибку. В одной из статей, чтобы проверить, работает ли модуль Pystan.. был приведенный ниже код. Однако выполнение этого дает мне ошибку - "FileNotFoundError: [WinError 2] Система не может найти указанный файл". Пожалуйста, найдите ниже детали. Пожалуйста, помогите решить эту проблему.

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code)
y = model.sampling(n_jobs=1).extract()['y']
y.mean()

Выход -

INFO:pystan:COMPILING THE C++ CODE FOR MODEL 
anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW.

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-10-3999a748c262> in <module>()
  1 import pystan
  2 model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
----> 3 model = pystan.StanModel(model_code=model_code)
  4 y = model.sampling(n_jobs=1).extract()['y']
  5 y.mean()

~\Anaconda3\lib\site-packages\pystan\model.py in __init__(self, file, 
charset, model_name, model_code, stanc_ret, boost_lib, eigen_lib, verbose, 
obfuscate_model_name, extra_compile_args)
311 
312         try:
--> 313             build_extension.run()
314         finally:
315             if redirect_stderr:

~\Anaconda3\lib\distutils\command\build_ext.py in run(self)
306                                      verbose=self.verbose,
307                                      dry_run=self.dry_run,
--> 308                                      force=self.force)
309         customize_compiler(self.compiler)
310         # If we are cross-compiling, init the compiler now (if we are 
not

~\Anaconda3\lib\distutils\ccompiler.py in new_compiler(plat, compiler, 
verbose, dry_run, force)
1029     # with classes that expect verbose to be the first positional
1030     # argument.
-> 1031     return klass(None, dry_run, force)
1032 
1033 

~\Anaconda3\lib\distutils\cygwinccompiler.py in __init__(self, verbose, 
dry_run, force)
299             entry_point = ''
300 
--> 301         if is_cygwingcc():
302             raise CCompilerError(
303                 'Cygwin gcc cannot be used with --compiler=mingw32')

~\Anaconda3\lib\distutils\cygwinccompiler.py in is_cygwingcc()
409 def is_cygwingcc():
410     '''Try to determine if the gcc that would be used is from cygwin.'''
--> 411     out_string = check_output(['gcc', '-dumpmachine'])
412     return out_string.strip().endswith(b'cygwin')

~\Anaconda3\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
314 
315     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 316                **kwargs).stdout
317 
318 

~\Anaconda3\lib\subprocess.py in run(input, timeout, check, *popenargs, 
**kwargs)
381         kwargs['stdin'] = PIPE
382 
--> 383     with Popen(*popenargs, **kwargs) as process:
384         try:
385             stdout, stderr = process.communicate(input, timeout=timeout)

~\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, 
stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, 
universal_newlines, startupinfo, creationflags, restore_signals, 
start_new_session, pass_fds)
674                                 c2pread, c2pwrite,
675                                 errread, errwrite,
--> 676                                 restore_signals, start_new_session)
677         except:
678             # Cleanup if the child failed starting.

~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, 
preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, 
shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, 
unused_restore_signals, unused_start_new_session)
955                                          env,
956                                          cwd,
--> 957                                          startupinfo)
958             finally:
959                 # Child is launched. Close the parent's copy of those 
pipe
FileNotFoundError: [WinError 2] The system cannot find the file specified

0 ответов

Другие вопросы по тегам