BYU-NLP-Lab / topicalguide

A web application for exploring documents topically.
http://tg.byu.edu
26 stars 13 forks source link

Cannot install scipy when using pip to install via the requirements.txt file #68

Open cojoco opened 9 years ago

cojoco commented 9 years ago

When I run pip install -r requirements.txt, scipy fails to install. It appears to install correctly when I use pip install scipy, though it takes a few minutes to successfully install.

cojoco commented 9 years ago

I tried removing the qualifiers on the modules (changed 'django==1.7' to 'django', 'numpy>=1.8.2' to 'numpy', and 'scipy>=0.14.0' to 'scipy'). I still ran into ImportError: No module named numpy.distutils.core whenever it tried to install scipy. The change to 'django' fixes #69, but the other two don't seem to make a difference.

Installing the modules separately using pip (or installing numpy using 'pip install numpy' before running 'pip install -r requirements.txt') seems to work, but the install fails when you try to install them at the same time. This appears related to the issue here: https://github.com/scipy/scipy/issues/3379. I am closing this issue for now.

juanpaco commented 9 years ago

I just did a fresh install, and I'm not getting the same error. A few questions:

1) Are you using virtualenv? 2) Can you either post directly into this thread or into a gist that you link to from this thread the full output of the installation command?

cojoco commented 9 years ago
  1. I am using virtualenv.
  2. I tried moving numpy to a spot below scipy in the requirements.txt file, and the install completed successfully on a fresh virtual environment. It appeared to install from bottom to top of the file.

I then created a new virtual environment, updated pip (for some reason it's at 6.0.8 on my machine, I updated it to 7.1.0), moved numpy back to its place above scipy, and the install completed successfully. It looks like my old pip installation was to blame for this problem.

It looks like I need to install the 'python-dateutil' module when using a virtualenv, however. This seems like something that would normally be installed, and perhaps isn't because I'm using virtualenv.

juanpaco commented 9 years ago

Do you mean that you had to do a manual installtion of python-dateutil. If that's a dependency of one of the other packages, I'd really expect it to get picked up.

Unless there's some sort of a version mismatch, I wouldn't expect virtualenv to affect the dependency resolution process. All it does is change where packages get stored so that each app can have its dependencies in isolation.

When you say that you needed to install it, I'm assuming you mean doing a manual pip install python-dateutil. Did you do that inside or outside of your virtual environment?

cojoco commented 9 years ago

I did need to do a manual pip install python-dateutil, and it was done inside of my virtual environment.