question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation breaks on Windows10 (conda environment)

See original GitHub issue

Hi everyone,

When I try to install kats on my machine (Windows 10, build see attached screenshot), the installation breaks building the wheel for fbprophet.

I am trying this on a fresh conda environment (conda version 4.10.1) and python3.8. My only guess is that this has todo with the ability to install pystan on windows, which is not possible without access to WSL2 (which I do not have because of corporate restrictions).

I will attach the error message below.

Attachments

Windows version

image

Error message

Error Message (click)


ERROR: Command errored out with exit status 1:
   command: 'C:\Users\matheiss\Miniconda3\envs\tiresias-kats\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\setup.py'"'"'; __file__='"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\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'"'"'))' bdist_wheel -d 'C:\Users\matheiss\AppData\Local\Temp\1\pip-wheel-xzjkrfhe'
       cwd: C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\
  Complete output (42 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\fbprophet
  creating build\lib\fbprophet\stan_model
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 122, in <module>
      setup(
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\setuptools\__init__.py", line 163, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 48, in run
      build_models(target_dir)
    File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 38, in build_models
      StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
    File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\fbprophet\models.py", line 209, in build_model
      import pystan
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\pystan\__init__.py", line 9, in <module>
      from pystan.api import stanc, stan
    File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\pystan\api.py", line 13, in <module>
      import pystan._api  # stanc wrapper
  ImportError: DLL load failed while importing _api: Das angegebene Modul wurde nicht gefunden.
  ----------------------------------------
  ERROR: Failed building wheel for fbprophet
  Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet, ax-platform, attrs, kats
    Running setup.py install for fbprophet ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\matheiss\Miniconda3\envs\tiresias-kats\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\setup.py'"'"'; __file__='"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\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'"'"'))' install --record 'C:\Users\matheiss\AppData\Local\Temp\1\pip-record-nj09haiu\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\matheiss\Miniconda3\envs\tiresias-kats\Include\fbprophet'
         cwd: C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\
    Complete output (44 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\fbprophet
    creating build\lib\fbprophet\stan_model
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 122, in <module>
        setup(
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\setuptools\__init__.py", line 163, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 48, in run
        build_models(target_dir)
      File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\setup.py", line 38, in build_models
        StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
      File "C:\Users\matheiss\AppData\Local\Temp\1\pip-install-5dy9pwq7\fbprophet_6fb4ff087aaf40478b71089d7e634e82\fbprophet\models.py", line 209, in build_model
        import pystan
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\pystan\__init__.py", line 9, in <module>
        from pystan.api import stanc, stan
      File "C:\Users\matheiss\Miniconda3\envs\tiresias-kats\lib\site-packages\pystan\api.py", line 13, in <module>
        import pystan._api  # stanc wrapper
    ImportError: DLL load failed while importing _api: Das angegebene Modul wurde nicht gefunden.
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\matheiss\Miniconda3\envs\tiresias-kats\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\setup.py'"'"'; __file__='"'"'C:\\Users\\matheiss\\AppData\\Local\\Temp\\1\\pip-install-5dy9pwq7\\fbprophet_6fb4ff087aaf40478b71089d7e634e82\\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'"'"'))' install --record 'C:\Users\matheiss\AppData\Local\Temp\1\pip-record-nj09haiu\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\matheiss\Miniconda3\envs\tiresias-kats\Include\fbprophet' Check the logs for full command output.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
reyembcommented, Jun 24, 2021

I have had the same problem. Here is how I fixed it.

I created an new conda environment (python 3.8.10)

Installed fbprophet by: conda install -c conda-forge fbprophet

And then installed kats by: pip install kats

The origin of the problem is that some compilers aren’t installed (gcc). Running the first command solves the problem. Hope it works for you as well 😃

3reactions
amitdingareNoveliscommented, Oct 9, 2021

I don’t think this works anymore. Kats has a strict requirement for fbprophet with version 0.7, but conda-forge has 0.7.1. So, when you try to install kats from pypi, it tries to downgrade fbprophet to 0.7 and then the problem persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Keras broke Conda virtual environment (Windows 10)
It seems that the scripts for activating keras are exiting prematurely. One of the reasons can be that the environment is not set...
Read more >
Troubleshooting - Anaconda Documentation
Run Update Index from the Environments page of Navigator. Quit and restart Navigator. If it's still broken, confirm that your .condarc file is...
Read more >
Installing scikit-learn
There are different ways to install scikit-learn: Install the latest official release ... NumPy or SciPy yet, you can also install these using...
Read more >
Troubleshooting — conda 22.11.1.post13+5eef286ca ...
Occasionally, an installed package becomes corrupted. Conda works by unpacking the packages in the pkgs directory and then hard-linking them to the environment....
Read more >
Getting a Working Pymc3 Windows 10 Installation using ...
When they were available, say via Anaconda or Cygwin or Mingw or MSYS2, configuration was a nightmare. Or a working install would break...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found