当我这样做时,pip install statsmodels
它给了我ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
,但随后我跑了pip install patsy
,它说它成功了,但是运行pip install statsmodels
仍然给我同样的错误,要求patsy.
怎么会这样?
$ 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 "", line 17, in File "/private/tmp/pip_build_root/statsmodels/setup.py", line 463, in 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 " ", line 17, in File "/private/tmp/pip_build_root/statsmodels/setup.py", line 463, in 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
tscizzle.. 6
错误消息没有告诉你的是模块six
不在那里确实存在问题.
通过这样做找到import patsy
它并让它失败并告诉我我需要它six
.所以我做了pip install six
,现在patsy导入工作,就像pip install statsmodels
.
错误消息没有告诉你的是模块six
不在那里确实存在问题.
通过这样做找到import patsy
它并让它失败并告诉我我需要它six
.所以我做了pip install six
,现在patsy导入工作,就像pip install statsmodels
.