stan-dev / cmdstanpy

CmdStanPy is a lightweight interface to Stan for Python users which provides the necessary objects and functions to compile a Stan program and fit the model to data using CmdStan.
BSD 3-Clause "New" or "Revised" License
151 stars 69 forks source link

update logo on docs #742

Closed mitzimorris closed 6 months ago

mitzimorris commented 6 months ago

Summary:

Use new Stan logo everywhere - https://github.com/stan-dev/logos/blob/master/logo_name.png

mitzimorris commented 6 months ago

I'm getting a wierd build error -


Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/Users/mitzi/miniconda3/envs/stan/lib/python3.11/site-packages/sphinx/config.py", line 350, in eval_config_file
    exec(code, namespace)
  File "/Users/mitzi/github/stan-dev/cmdstanpy/docsrc/conf.py", line 146, in <module>
    from cmdstanpy import __version__
  File "/Users/mitzi/github/stan-dev/cmdstanpy/cmdstanpy/__init__.py", line 25, in <module>
    from .compilation import compile_stan_file, format_stan_file
  File "/Users/mitzi/github/stan-dev/cmdstanpy/cmdstanpy/compilation.py", line 16, in <module>
    from cmdstanpy.utils import get_logger
  File "/Users/mitzi/github/stan-dev/cmdstanpy/cmdstanpy/utils/__init__.py", line 32, in <module>
    from .stancsv import (
  File "/Users/mitzi/github/stan-dev/cmdstanpy/cmdstanpy/utils/stancsv.py", line 10, in <module>
    import pandas as pd
  File "/Users/mitzi/miniconda3/envs/stan/lib/python3.11/site-packages/pandas/__init__.py", line 19, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
dateutil: No module named 'dateutil'
WardBrian commented 6 months ago

Are you able to import pandas normally? That error doesn't seem directly related to the docs

mitzimorris commented 6 months ago

agreed, not directly related to the docs. it's more of an install/config thing.

here's what I did - from home directory of cmdstanpy, version develop:

conda create --name stan --clone base
conda activate stan
python --version
pip3 install -e .[all,docs,test]

shouldn't this give me everything I need to build the docs?

WardBrian commented 6 months ago

I think you'd be missing cmdstan.

But the --clone base is suspect to me - if you already had a copy of pandas (potentially a broken one, for whatever reason) you'd end up with it in here as well.

mitzimorris commented 6 months ago

OK, the problem is that you need to install pandas via conda - installing pandas using pip doesn't get the libraries needed for dateutil.

Installing python-dateutil via pip didn't help either.

(stan) ~/github/stan-dev/cmdstanpy (develop)> conda install pandas
Channels:
 - conda-forge
 - defaults
Platform: osx-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/mitzi/miniconda3/envs/stan

  added / updated specs:
    - pandas

The following NEW packages will be INSTALLED:

  libblas            conda-forge/osx-64::libblas-3.9.0-21_osx64_openblas 
  libcblas           conda-forge/osx-64::libcblas-3.9.0-21_osx64_openblas 
  libgfortran        conda-forge/osx-64::libgfortran-5.0.0-13_2_0_h97931a8_3 
  libgfortran5       conda-forge/osx-64::libgfortran5-13.2.0-h2873a65_3 
  liblapack          conda-forge/osx-64::liblapack-3.9.0-21_osx64_openblas 
  libopenblas        conda-forge/osx-64::libopenblas-0.3.26-openmp_hfef2a42_0 
  llvm-openmp        conda-forge/osx-64::llvm-openmp-18.1.2-hb6ac08f_0 
  numpy              conda-forge/osx-64::numpy-1.26.4-py311hc43a94b_0 
  pandas             conda-forge/osx-64::pandas-2.2.1-py311h8f6166a_0 
  python-dateutil    conda-forge/noarch::python-dateutil-2.9.0-pyhd8ed1ab_0 
  python-tzdata      conda-forge/noarch::python-tzdata-2024.1-pyhd8ed1ab_0 
  pytz               conda-forge/noarch::pytz-2024.1-pyhd8ed1ab_0 
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0