prophet icon indicating copy to clipboard operation
prophet copied to clipboard

prophet setup on Windows errors

Open bernardoiconpro opened this issue 3 years ago • 1 comments

Hello,

While installing prophet 1.1 on Windows I got this error:

Running setup.py develop for prophet
ERROR: Command errored out with exit status 1:
 command: 'c:\users\dalfovodesouzabernar\downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DALFOVODESOUZABernar\\Downloads\\tsaf-v0.9.4-online-win\\win64\\.tsafvenv\\Lib\\site-packages\\prophet\\setup.py'"'"'; __file__='"'"'C:\\Users\\DALFOVODESOUZABernar\\Downloads\\tsaf-v0.9.4-online-win\\win64\\.tsafvenv\\Lib\\site-packages\\prophet\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
     cwd: C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\
Complete output (54 lines):
running develop
creating prophet\stan_model
C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 226, in <module>
    setup(
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
    return run_commands(dist)
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
    dist.run_commands()
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
    super().run_command(command)
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
    cmd_obj.run()
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 159, in run
    build_models(target_dir)
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 128, in build_models
    build_cmdstan_model(target_dir)
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 106, in build_cmdstan_model
    install_cmdstan_deps(cmdstan_dir)
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 77, in install_cmdstan_deps
    maybe_install_cmdstan_toolchain()
  File "C:\Users\DALFOVODESOUZABernar\Downloads\tsaf-v0.9.4-online-win\win64\.tsafvenv\Lib\site-packages\prophet\setup.py", line 62, in maybe_install_cmdstan_toolchain
    from cmdstanpy.install_cxx_toolchain import main as _install_cxx_toolchain
ImportError: cannot import name 'main' from 'cmdstanpy.install_cxx_toolchain' (C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\cmdstanpy\install_cxx_toolchain.py)
--- Logging error ---
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1088, in emit
    stream.write(msg + self.terminator)
ValueError: underlying buffer has been detached
Call stack:
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\cmdstanpy\__init__.py", line 31, in _cleanup_tmpdir
    logging.getLogger('cmdstanpy').info('deleting tmpfiles dir: %s', _TMPDIR)
Message: 'deleting tmpfiles dir: %s'
Arguments: ('C:\\Users\\DALFOV~1\\AppData\\Local\\Temp\\tmp6o3mvs63',)
--- Logging error ---
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\logging\__init__.py", line 1088, in emit
    stream.write(msg + self.terminator)
ValueError: underlying buffer has been detached
Call stack:
  File "C:\Users\DALFOVODESOUZABernar\AppData\Local\Temp\pip-build-env-drjskkhl\overlay\Lib\site-packages\cmdstanpy\__init__.py", line 33, in _cleanup_tmpdir
    logging.getLogger('cmdstanpy').info('done')
Message: 'done'
Arguments: ()
Compiling cmdstanpy model

Same installation process on Linux works fine.

Tried downgrading cmdstanpy to 1.0.1 and it still happens. This installation process, prior to prophet 1.1, worked fine as well.

bernardoiconpro avatar Jul 04 '22 07:07 bernardoiconpro

I typically try to install with Conda. Do you have an C++ compiler installed that cmdstanpy can use?

ghost avatar Aug 06 '22 04:08 ghost

This should be resolved by more recent updates

WardBrian avatar Oct 12 '23 13:10 WardBrian