Changing package install order in Python Changing package install order in Python heroku heroku

Changing package install order in Python


Pip is not very good at handling package dependencies as easy_install. We had the same problem in our project. Even though the order in req.txt was correct, we had dependency problems that is related to order.

My solution is to feed the req.txt to easy_install, but than you should be careful with the packages that is editable or those from github etc.

You may want to check below links:

http://metak4ml.blogspot.com/2009/08/easyinstall-read-pip-requirementstxt.htmlhttp://community.webfaction.com/questions/1220/using-easy_install-to-get-all-dependencies-listed-in-requirementstxt (while read line answer is close to what we do)


Pyton setup install scripts hold already requirements and order, so the install process will respect and install in order all requirements for each of your app in the requirements file.

So, if you have your own applications that require others, put your requirements only in your setup files and enroll your main application in the requirements.txt

For third party python apps that don't require compilation you don't have to worry about the order in your requirements.

Otherwise eazy_install becomes deprecated, use pip instead of it.