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 that it is successful, but it still works pip install statsmodels

, it still gives me the same error as the patsy requirement.

How can it 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

      

+3


source to share


4 answers


What the error message doesn't tell you is that the module is six

not the problem.



Found this by doing import patsy

and not getting it and tell me what I need six

. So I did pip install six

and now patty import worked just like pip install statsmodels

.

+6


source


For me:

$python3 -m pip install --upgrade patsy
$python3 -m pip install statsmodels

      



works!

+1


source


For those who are still struggling, I highly recommend this site: Python Libraries . I am using Python 3, so I,

  • Uploaded a file named: statsmodels‑0.8.0‑cp35‑cp35m‑win_amd64.whl

  • Windows Open Command Prompt
  • Moved to the "My files" directory ( cd Downloads

    )
  • And then pip ( pip install statsmodels‑0.8.0‑cp35‑cp35m‑win_amd64.whl

    ) is used
+1


source


I also had a problem with this in Python 3.4. It worked using the statsmodel WHL file from this link: https://pypi.python.org/pypi/statsmodels#downloads

After downloading, I installed it using: pip3.4 install my_directory \ statsmodels-0.8.0rc1-cp34-none-win_amd64.whl where my_directory is where I put the WHL file.

0


source







All Articles