Menu

#75 statsmodels produces ImportError: No module named patsy

Done
nobody
None
Medium
Defect
2014-04-27
2013-08-13
Anonymous
No

Originally created by: postaanm...@gmail.com

What steps will reproduce the problem?
1. try to import statsmodels with: import statsmodels.formula.api  as sm
2. following error appears:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 538, in runfile
    execfile(filename, namespace)
  File "M:\OFRC\Projects\Theme A real world scenarios\A.39 Impose View\JPM_Publication\Python\untitled0.py", line 7, in <module>
    import statsmodels.formula.api  as sm
  File "C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\statsmodels\formula\__init__.py", line 4, in <module>
    from formulatools import handle_formula_data
  File "C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\statsmodels\formula\formulatools.py", line 2, in <module>
    from patsy import dmatrices
ImportError: No module named patsy

What is the expected output? What do you see instead?
No error

What version of the product are you using? On what operating system?
Winpython 2.7.5.2 (64 bit) using statsmodels 0.5

Please provide any additional information below.
This example works in winpython 2.7.5.1 using statsmodels 0.4.3
This should work according the examples listed here: http://statsmodels.sourceforge.net/devel/

Discussion

  • Anonymous

    Anonymous - 2013-08-13

    Originally posted by: pierre.raybaut (code.google.com)

    My mistake, I forgot to add the required dependency "patsy" to the package list. I'll fix this in the next release.

    In the meantime, you may install patsy using the WinPython Control Panel:

    1. Download the 2.7/64bit version of patsy here:
    http://www.lfd.uci.edu/~gohlke/pythonlibs/#patsy

    2. Execute the WinPython Control Panel

    3. Drag an drop the installer downloaded at step 1 and click on "Install"

    Status: Done

     
  • Anonymous

    Anonymous - 2013-08-13

    Originally posted by: postaanm...@gmail.com

    This indeed fixes the issue, thnx!

     

Log in to post a comment.

MongoDB Logo MongoDB