uber / orbit

A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood.
https://orbit-ml.readthedocs.io/en/stable/
Other
1.87k stars 134 forks source link

RuntimeError: CmdStan failed to install in repackaged directory #808

Closed bbluhmwb closed 10 months ago

bbluhmwb commented 1 year ago

Describe the bug I am trying to pip install the latest version orbit-ml-1.1.4.2 into my conda env in github codespaces but running into an error.

Do you have any idea of how to fix the issue? Thanks a lot!

Error:

Collecting orbit-ml
  Using cached orbit-ml-1.1.4.2.tar.gz (445 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyro-ppl>=1.4.0
  Using cached pyro_ppl-1.8.4-py3-none-any.whl (730 kB)
Requirement already satisfied: tqdm>=4.36.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (4.64.1)
Requirement already satisfied: cmdstanpy>=1.0.4 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (1.1.0)
Requirement already satisfied: setuptools>=42 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (67.3.3)
Requirement already satisfied: numpy>=1.18 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (1.24.2)
Requirement already satisfied: torch>=1.11.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (1.13.1)
Requirement already satisfied: scipy>=1.4.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (1.10.1)
Collecting seaborn>=0.10.0
  Using cached seaborn-0.12.2-py3-none-any.whl (293 kB)
Collecting statsmodels>=0.11.1
  Using cached statsmodels-0.13.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB)
Collecting arviz
  Using cached arviz-0.15.0-py3-none-any.whl (1.6 MB)
Collecting matplotlib>=3.3.2
  Using cached matplotlib-3.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Requirement already satisfied: pandas>=1.0.3 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from orbit-ml) (1.5.3)
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (4.38.0)
Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (0.11.0)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB)
Requirement already satisfied: pyparsing>=2.3.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (3.0.9)
Requirement already satisfied: importlib-resources>=3.2.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (5.12.0)
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (2.8.2)
Requirement already satisfied: packaging>=20.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (22.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (1.4.4)
Requirement already satisfied: pillow>=6.2.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from matplotlib>=3.3.2->orbit-ml) (9.4.0)
Requirement already satisfied: pytz>=2020.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from pandas>=1.0.3->orbit-ml) (2022.7.1)
Requirement already satisfied: pyro-api>=0.1.1 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from pyro-ppl>=1.4.0->orbit-ml) (0.1.2)
Collecting opt-einsum>=2.3.2
  Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting patsy>=0.5.2
  Using cached patsy-0.5.3-py2.py3-none-any.whl (233 kB)
Requirement already satisfied: typing-extensions in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from torch>=1.11.0->orbit-ml) (4.5.0)
Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from torch>=1.11.0->orbit-ml) (11.10.3.66)
Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from torch>=1.11.0->orbit-ml) (11.7.99)
Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from torch>=1.11.0->orbit-ml) (8.5.0.96)
Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from torch>=1.11.0->orbit-ml) (11.7.99)
Requirement already satisfied: wheel in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.11.0->orbit-ml) (0.38.4)
Collecting h5netcdf>=1.0.2
  Using cached h5netcdf-1.1.0-py2.py3-none-any.whl (26 kB)
Collecting xarray-einstats>=0.3
  Using cached xarray_einstats-0.5.1-py3-none-any.whl (28 kB)
Collecting xarray>=0.21.0
  Using cached xarray-2023.2.0-py3-none-any.whl (975 kB)
Collecting h5py
  Using cached h5py-3.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)
Requirement already satisfied: zipp>=3.1.0 in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib>=3.3.2->orbit-ml) (3.14.0)
Requirement already satisfied: six in /opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages (from patsy>=0.5.2->statsmodels>=0.11.1->orbit-ml) (1.16.0)
Building wheels for collected packages: orbit-ml
  Building wheel for orbit-ml (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for orbit-ml (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [119 lines of output]
      running bdist_wheel
      running build
      running build_py
      Importing cmdstanpy...
      Installing cmdstan...
      Installing CmdStan version: 2.31.0
      Install directory: /home/codespace/.cmdstan
      Downloading CmdStan version 2.31.0

      0.00B [00:00, ?B/s]
        0%|          | 0.00/47.3M [00:00<?, ?B/s]
       75%|███████▍  | 35.4M/47.3M [00:00<00:00, 371MB/s]

      Download successful, file: /tmp/tmpw1izjyvd
      Extracting distribution

        0%|          | 0/29790 [00:00<?, ?it/s]
        1%|          | 250/29790 [00:00<00:14, 2044.82it/s]
        2%|▏         | 455/29790 [00:00<00:41, 705.49it/s]
        4%|▎         | 1045/29790 [00:00<00:16, 1794.13it/s]
        6%|▌         | 1756/29790 [00:00<00:09, 3018.95it/s]
        8%|▊         | 2373/29790 [00:00<00:07, 3798.85it/s]
       10%|▉         | 2938/29790 [00:00<00:06, 4280.31it/s]
       12%|█▏        | 3517/29790 [00:01<00:05, 4689.70it/s]
       14%|█▍        | 4210/29790 [00:01<00:04, 5314.51it/s]
       16%|█▌        | 4808/29790 [00:01<00:04, 5415.60it/s]
       18%|█▊        | 5396/29790 [00:01<00:04, 5391.79it/s]
       20%|██        | 5967/29790 [00:01<00:04, 5436.39it/s]
       22%|██▏       | 6535/29790 [00:01<00:04, 5502.02it/s]
       24%|██▍       | 7271/29790 [00:01<00:03, 6040.28it/s]
       27%|██▋       | 8083/29790 [00:01<00:03, 6647.18it/s]
       30%|██▉       | 8843/29790 [00:01<00:03, 6926.51it/s]
       32%|███▏      | 9665/29790 [00:01<00:02, 7309.47it/s]
       35%|███▍      | 10403/29790 [00:02<00:02, 6878.77it/s]
       38%|███▊      | 11218/29790 [00:02<00:02, 7240.92it/s]
       41%|████      | 12203/29790 [00:02<00:02, 7994.62it/s]
       44%|████▎     | 13012/29790 [00:02<00:02, 7853.44it/s]
       46%|████▋     | 13804/29790 [00:02<00:02, 6558.41it/s]
       49%|████▊     | 14499/29790 [00:02<00:02, 6250.04it/s]
       51%|█████▏    | 15284/29790 [00:02<00:02, 6659.43it/s]
       54%|█████▎    | 15977/29790 [00:02<00:02, 6324.13it/s]
       56%|█████▌    | 16721/29790 [00:03<00:01, 6617.63it/s]
       59%|█████▉    | 17584/29790 [00:03<00:01, 7168.85it/s]
       62%|██████▏   | 18515/29790 [00:03<00:01, 7770.34it/s]
       65%|██████▍   | 19312/29790 [00:03<00:01, 7827.24it/s]
       67%|██████▋   | 20107/29790 [00:03<00:01, 7788.57it/s]
       71%|███████   | 21062/29790 [00:03<00:01, 8267.51it/s]
       74%|███████▎  | 21896/29790 [00:03<00:00, 8037.84it/s]
       76%|███████▌  | 22706/29790 [00:03<00:00, 7404.15it/s]
       79%|███████▊  | 23459/29790 [00:03<00:00, 7013.42it/s]
       81%|████████  | 24172/29790 [00:04<00:00, 6389.15it/s]
       84%|████████▍ | 25001/29790 [00:04<00:00, 6878.40it/s]
       86%|████████▋ | 25707/29790 [00:04<00:00, 6505.79it/s]
       89%|████████▉ | 26444/29790 [00:04<00:00, 6735.51it/s]
       91%|█████████ | 27155/29790 [00:04<00:00, 6836.80it/s]
       94%|█████████▍| 28002/29790 [00:04<00:00, 7296.43it/s]
       97%|█████████▋| 28819/29790 [00:04<00:00, 7544.15it/s]
       99%|█████████▉| 29603/29790 [00:04<00:00, 7628.39it/s]

      Unpacked download as cmdstan-2.31.0
      Building version cmdstan-2.31.0, may take several minutes, depending on your system.
      cmd: make build -j2
      cwd: None
      16:23:50 - cmdstanpy - WARNING - CmdStan installation failed.
      Command "make build" failed
      Command ['make', 'build', '-j2']
          error during processing No such file or directory
      CmdStan installation failed.
      Command "make build" failed
      Command ['make', 'build', '-j2']
          error during processing No such file or directory
      stan/lib/stan_math/make/libraries:117: *** "Need to set TBB_CXX_TYPE for non-standard compiler other than gcc or clang.".  Stop.
      Traceback (most recent call last):
        File "/opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/conda/envs/mlflow-flavors-dev/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 99, in <module>
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-glm9uavx/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 77, in run
        File "<string>", line 67, in install_cmdstanpy
      RuntimeError: CmdStan failed to install in repackaged directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for orbit-ml
Failed to build orbit-ml
ERROR: Could not build wheels for orbit-ml, which is required to install pyproject.toml-based projects

To Reproduce Steps to reproduce the behavior:

pip install orbit-ml

Expected behavior Installation without error

Environment (please complete the following information):

edwinnglabs commented 1 year ago

@bbluhmwb according to the error message

error during processing No such file or directory
      stan/lib/stan_math/make/libraries:117: *** "Need to set TBB_CXX_TYPE for non-standard compiler other than gcc or clang.".  Stop.
      Traceback (most recent call last):

try run export TBB_CXX_TYPE=gcc before the pip install

bbluhmwb commented 1 year ago

@edwinnglabs thanks for your feedback!

If I run export TBB_CXX_TYPE=gcc before the pip install I run into another error:

Command "make clean-all" failed
      Command ['make', 'examples/bernoulli/bernoulli']
          error during processing No such file or directory

Complete logs below:

  Building wheel for orbit-ml (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for orbit-ml (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [147 lines of output]
      running bdist_wheel
      running build
      running build_py
      Importing cmdstanpy...
      Installing cmdstan...
      Installing CmdStan version: 2.31.0
      Install directory: /home/codespace/.cmdstan
      Downloading CmdStan version 2.31.0

      0.00B [00:00, ?B/s]
        0%|          | 0.00/47.3M [00:00<?, ?B/s]
       68%|██████▊   | 32.4M/47.3M [00:00<00:00, 340MB/s]

      Download successful, file: /tmp/tmpyd94eni_
      Extracting distribution

        0%|          | 0/29790 [00:00<?, ?it/s]
        1%|          | 250/29790 [00:00<00:19, 1477.71it/s]
        1%|▏         | 398/29790 [00:00<00:42, 694.83it/s]
        3%|▎         | 793/29790 [00:00<00:19, 1459.33it/s]
        4%|▍         | 1188/29790 [00:00<00:13, 2084.38it/s]
        5%|▍         | 1481/29790 [00:00<00:12, 2307.06it/s]
        7%|▋         | 2209/29790 [00:00<00:07, 3652.86it/s]
        9%|▉         | 2688/29790 [00:01<00:06, 3970.06it/s]
       11%|█         | 3139/29790 [00:01<00:06, 3966.00it/s]
       12%|█▏        | 3572/29790 [00:01<00:06, 3822.03it/s]
       14%|█▎        | 4055/29790 [00:01<00:06, 4096.91it/s]
       15%|█▌        | 4596/29790 [00:01<00:05, 4463.42it/s]
       17%|█▋        | 5061/29790 [00:01<00:05, 4302.12it/s]
       19%|█▊        | 5579/29790 [00:01<00:05, 4546.75it/s]
       20%|██        | 6078/29790 [00:01<00:05, 4673.38it/s]
       22%|██▏       | 6589/29790 [00:01<00:04, 4799.52it/s]
       24%|██▍       | 7151/29790 [00:01<00:04, 5035.85it/s]
       26%|██▌       | 7689/29790 [00:02<00:04, 5136.03it/s]
       28%|██▊       | 8207/29790 [00:02<00:04, 5143.14it/s]
       29%|██▉       | 8724/29790 [00:02<00:04, 5061.08it/s]
       31%|███       | 9233/29790 [00:02<00:04, 5019.00it/s]
       33%|███▎      | 9795/29790 [00:02<00:03, 5194.36it/s]
       35%|███▍      | 10316/29790 [00:02<00:04, 4789.21it/s]
       37%|███▋      | 10896/29790 [00:02<00:03, 5070.02it/s]
       38%|███▊      | 11411/29790 [00:02<00:03, 5084.02it/s]
       40%|████      | 11946/29790 [00:02<00:03, 5160.08it/s]
       42%|████▏     | 12598/29790 [00:03<00:03, 5556.73it/s]
       44%|████▍     | 13183/29790 [00:03<00:02, 5643.05it/s]
       46%|████▌     | 13750/29790 [00:03<00:02, 5631.35it/s]
       48%|████▊     | 14340/29790 [00:03<00:02, 5710.03it/s]
       50%|█████     | 14913/29790 [00:03<00:02, 5373.21it/s]
       52%|█████▏    | 15503/29790 [00:03<00:02, 5497.56it/s]
       54%|█████▍    | 16057/29790 [00:03<00:02, 4861.72it/s]
       56%|█████▌    | 16576/29790 [00:03<00:02, 4947.26it/s]
       57%|█████▋    | 17126/29790 [00:03<00:02, 5099.56it/s]
       60%|█████▉    | 17736/29790 [00:03<00:02, 5381.32it/s]
       62%|██████▏   | 18323/29790 [00:04<00:02, 5521.75it/s]
       63%|██████▎   | 18882/29790 [00:04<00:02, 5432.51it/s]
       65%|██████▌   | 19445/29790 [00:04<00:01, 5487.04it/s]
       67%|██████▋   | 19998/29790 [00:04<00:01, 5313.74it/s]
       69%|██████▉   | 20533/29790 [00:04<00:01, 5311.53it/s]
       71%|███████   | 21080/29790 [00:04<00:01, 5357.49it/s]
       73%|███████▎  | 21618/29790 [00:04<00:01, 5146.23it/s]
       75%|███████▍  | 22238/29790 [00:04<00:01, 5446.59it/s]
       76%|███████▋  | 22786/29790 [00:04<00:01, 5112.04it/s]
       78%|███████▊  | 23382/29790 [00:05<00:01, 5348.87it/s]
       80%|████████  | 23923/29790 [00:05<00:01, 3906.79it/s]
       82%|████████▏ | 24414/29790 [00:05<00:01, 4135.24it/s]
       84%|████████▎ | 24876/29790 [00:05<00:01, 4135.08it/s]
       85%|████████▌ | 25323/29790 [00:05<00:01, 4117.50it/s]
       86%|████████▋ | 25758/29790 [00:05<00:00, 4109.37it/s]
       88%|████████▊ | 26255/29790 [00:05<00:00, 4339.89it/s]
       90%|████████▉ | 26750/29790 [00:05<00:00, 4508.97it/s]
       92%|█████████▏| 27288/29790 [00:06<00:00, 4755.17it/s]
       93%|█████████▎| 27796/29790 [00:06<00:00, 4846.88it/s]
       95%|█████████▍| 28288/29790 [00:06<00:00, 4676.21it/s]
       97%|█████████▋| 28826/29790 [00:06<00:00, 4875.14it/s]
       99%|█████████▊| 29372/29790 [00:06<00:00, 5044.47it/s]

      Unpacked download as cmdstan-2.31.0
      Building version cmdstan-2.31.0, may take several minutes, depending on your system.
      cmd: make build -j2
      cwd: None

      --- CmdStan v2.31.0 built ---
      Test model compilation
      cmd: make examples/bernoulli/bernoulli
      cwd: None
      06:46:20 - cmdstanpy - WARNING - CmdStan installation failed.
      Command "make clean-all" failed
      Command ['make', 'examples/bernoulli/bernoulli']
          error during processing No such file or directory
      CmdStan installation failed.
      Command "make clean-all" failed
      Command ['make', 'examples/bernoulli/bernoulli']
          error during processing No such file or directory

      --- Compiling, linking C++ code ---
      g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS          -c -Wno-ignored-attributes   -x c++ -o examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.hpp
      g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS                -Wl,-L,"/home/codespace/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/home/codespace/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb"      examples/bernoulli/bernoulli.o src/cmdstan/main.o        -Wl,-L,"/home/codespace/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/home/codespace/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb"   stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a  stan/lib/stan_math/lib/tbb/libtbb.so.2 -o examples/bernoulli/bernoulli
      /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
      (.text+0x24): undefined reference to `main'
      collect2: error: ld returned 1 exit status
      make: *** [make/program:59: examples/bernoulli/bernoulli] Error 1
      Traceback (most recent call last):
        File "/opt/conda/envs/mlflow-flavors-dev2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/opt/conda/envs/mlflow-flavors-dev2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/conda/envs/mlflow-flavors-dev2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 99, in <module>
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
          self.run_command("build")
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-771rbzch/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 77, in run
        File "<string>", line 67, in install_cmdstanpy
      RuntimeError: CmdStan failed to install in repackaged directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for orbit-ml
Failed to build orbit-ml
ERROR: Could not build wheels for orbit-ml, which is required to install pyproject.toml-based projects
edwinnglabs commented 1 year ago

@bbluhmwb is conda an option for you? e.g.

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install orbit-ml

i wonder if there is anything specific with your cmdstanpy version and your os.

bbluhmwb commented 1 year ago

@edwinnglabs

is conda an option for you? e.g.

Conda is not really an option unfortunately as I want to build a pip-installable package that pulls orbit depdendency from setup.py

i wonder if there is anything specific with your cmdstanpy version and your os.

This is a good question which I find difficult to answer as I currently would not know what else to check. I am working on github codespaces, command lsb_release -a gives the following output:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal
edwinnglabs commented 1 year ago

@edwinnglabs

is conda an option for you? e.g.

Conda is not really an option unfortunately as I want to build a pip-installable package that pulls orbit depdendency from setup.py

i wonder if there is anything specific with your cmdstanpy version and your os.

This is a good question which I find difficult to answer as I currently would not know what else to check. I am working on github codespaces, command lsb_release -a gives the following output:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

Are you able to run pip install cmdstanpy?

bbluhmwb commented 1 year ago

yes this works:

Successfully installed cmdstanpy-1.1.0 numpy-1.24.2 pandas-1.5.3 python-dateutil-2.8.2 pytz-2022.7.1 six-1.16.0 tqdm-4.64.1

Also found out that I can get cmdstan installed from within Python using this workaround

However, when I then try to pip install orbit-ml I yet run into another error:

CmdStan installation failed.
Command "make build" failed
Command ['make', 'build', '-j2']
    error during processing No such file or directory

In any case I guess this must be an environment problem and not caused by orbit-ml installation process. Will report back in case I find a solution.

sluo1250 commented 1 year ago

Hi did you figure out the problem? I have the same issue here where I tried to do pip install when building a docker image.

udheep123 commented 1 year ago

Hi, even I have similar issue installing orbit-ml on ubuntu. Please help at the earliest.

patricna commented 1 year ago

I have the same issue with orbit-ml on Mac: ERROR: Could not build wheels for orbit-ml, which is required to install pyproject.toml-based projects

swotai commented 1 year ago

Have the same issue on databricks, even if i do pip install cmdstanpy before the actual pip install orbit-ml I still have the same error RuntimeError: CmdStan failed to install in repackaged directory The curious thing is that I have this error even with the --no-dependencies flag.

georgehaws commented 1 year ago

I had the same issue. Unable to install onto a Windows 10 anaconda env with either pip or conda/mamba. This happened to me when I upgraded my laptop (whereas I didn't bother to export my env to .yml, because I have the dumb).

I believe this had been caused by Microsoft Visual Studio C++ compiler. In my specific case, the issue ultimately might have been a little different; it was with PyStan not being 100% compatible with Windows...

Anyway, I beat myself to death trying to make Windows work, but the fix was ultimately to just put everything into WSL, which has non-FUBAR C++ compiler. I swear the models run a lot faster on WSL now too!

Everybody don't be like me, "broken MSVC compiler" is not what you want to be when you grow up...

SamueleCorsalini commented 11 months ago

I was able to solve the problem by manually installing cmdstanpy using this command:

conda install -c conda-forge cmdstanpy

Afterwards:

pip install orbit-ml

worked with no issues.

Hope this is helpful for someone.

edwinnglabs commented 10 months ago

This is also associated with the version stored in noarch was not catching up the change in cmdstanpy. This should be fixed now