mattjj / pyhsmm

MIT License
547 stars 173 forks source link

troubles with setup -- no module named cstats #18

Closed LottiePrice closed 10 years ago

LottiePrice commented 10 years ago

Hi Matt,

I'm trying to run from the examples directory, and it's giving me an import error. Here is the last part of the message:

File "C:\Python27\lib\site-packages\pybasicbayes\distributions.py|, line 20, in from util.cstats import sample_crp_tablecounts ImportError: No module named cstats

It sounds like cstats hasn't built correctly. I've downloaded your pybasicbayes distribution into the site-packages directory, and when I tried running the in the pybasicbayes\util directory, I got the following message:

Cythonizing cstats.pyx running install running build running build_ext building 'cstats' extension error: Unable to find vcvarsall.bat

What is vcvarsall.bat, and where might it be? (and how can I get cstats/cython to find it?)

Thanks for your help,

Lottie

mattjj commented 10 years ago

Hrm, unfortunately I've never heard of that before, and I haven't tried this code on Windows at all. Answers to this SO question seem to suggest that the build process is looking for some things Visual Studio-related.

Are you able to build any Cython code on your machine? If not, that may be a first step to getting the pyhsmm build process to work.

mattjj commented 10 years ago

It would be possible to run the library without building anything if a couple import statements were tweaked and the sample_crp_tablecounts function in cstats got a Python version, but it would get a bit slower. Would that be useful to you?

mattjj commented 10 years ago

This was a platform-specific issue not specific to pyhsmm and I'm not sure if it was ever resolved.