tscizzle tscizzle - 2 months ago 14
Python Question

installed patsy, still can't install statsmodels

When I do

pip install statsmodels
it gives me
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
, but then I run
pip install patsy
and it says its successful, but running
pip install statsmodels
still gives me same error about requiring patsy.

How can this be?




$ sudo pip install patsy
Requirement already satisfied (use --upgrade to upgrade): patsy in /Library/Python/2.7/site-packages/patsy-0.3.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Python/2.7/site-packages/numpy-1.8.2-py2.7-macosx-10.9-intel.egg (from patsy)
Cleaning up...
$ sudo pip install statsmodels
Downloading/unpacking statsmodels
Downloading statsmodels-0.5.0.tar.gz (5.5MB): 5.5MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>
check_dependency_versions(min_versions)
File "/private/tmp/pip_build_root/statsmodels/setup.py", line 122, in check_dependency_versions
raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/private/tmp/pip_build_root/statsmodels/setup.py", line 463, in <module>

check_dependency_versions(min_versions)

File "/private/tmp/pip_build_root/statsmodels/setup.py", line 122, in check_dependency_versions

raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")

ImportError: statsmodels requires patsy. http://patsy.readthedocs.org

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/statsmodels
Storing debug log for failure in /Users/Jacob/Library/Logs/pip.log

Answer

What the error message doesn't tell you is that the module six not being there is really the problem.

Found this out by doing import patsy and having it fail and tell me that I needed six. So I did pip install six and now the patsy import worked, as did the pip install statsmodels.