Requirements.txt install numpy before scipy?

Viewed 5146

I am running a python server using Azure and have a requirements.txt file to install the necessary dependencies. Everything worked fine until I added scipy. On the build I get this first

Using legacy setup.py install for scipy, since package 'wheel' is not installed.

Then, once it starts to install it, it installs it before numpy, despite numpy being higher up on the requirements.txt. I'm not sure what to do, here's my requirements.txt

wheel==0.34.2
numpy==1.18.0
bs4==0.0.1
dash==1.12.0
dash-table==4.7.0
Flask==1.1.2
pandas==1.0.4
requests==2.12.4
tweepy==3.8.0
nltk==3.2.2
scipy==1.2.3
1 Answers

The order of the dependencies in requirements.txt does not mandate the order in which they are installed

Instead, they are installed in order of dependency. There is probably some other package that depends on scipy in your case.

I believe your problem is that you have run into a dependency hell by overspecifying the dependencies, causing a version conflict somewhere. Only include the dependencies you use in your own code and let pip figure out the transitive dependencies.

Related