When deploying to elastic beanstalk I keep getting the error:
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Le610u/scikit-learn/setup.py", line 247, in <module>
setup_package()
File "/tmp/pip-build-Le610u/scikit-learn/setup.py", line 237, in setup_package
.format(scipy_req_str, instructions))
ImportError: Scientific Python (SciPy) is not installed.
scikit-learn requires SciPy >= 0.9.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
My requirements.txt has both scikit-learn and scipy in it.
Why is this occurring? I don't want to be installing packages manually, and was under the impression pip would sort out the installation order for me (it's currently trying to install scikit-learn before scipy). It might be worth noting the same requirements.txt works perfectly fine on my local computer.
What can I do to fix this?
Edit: If I change the order of the entries in requirements.txt so scipy is above scikit-learn, it works just fine. I'd still like to know why this fails the other way around though, since pip freeze > requirements.txt will override it with alphabetical ordering.