cmdstanpy
cmdstanpy copied to clipboard
ModuleNotFoundError: No module named 'cmdstanpy'
I have installed cmstan.2.36 in my Ubuntu 24.04.2 LTS machine which has python3.12. For the other python libraries, I am using for example "sudo apt install python3-pandas" as pip install does not seem to be working. How do I compile a code which uses Cmdstanpy?? Please help.
You might want to figure out why pip install does not work.
Do you need to use python or python3 to start python? Do you have pip3 command.
Does python -m pip install xyz work?
@riasain when you are installing Python packages via your distro's package manager (apt), you are likely installing them into your system environment. Packages installed via pip are not necessarily installed to that same location and this can cause confusion as packages you have installed via different means don't see each other.
To make it less confusing and ensure you are installing all the appropriate dependencies correctly, you should be using virtual environments or some equivalent (like a conda environment). Within a virtual environment, you should be able to install all the packages you need such as cmdstanpy, jupyter, pandas, etc.