[BB-1453] Pre-install numpy before installing matplotlib

Description

This is because, matplotlib tries to download the latest version
of numpy, which is not compatible with python 2.7 any more, during its
setup.

This issue is similar to the issue fixed a while ago in https://github.com/edx/edx-platform/pull/15101.

*JIRA tickets*: None

*Discussions*: I have mentioned this issue on the Open edX Slack [here](https://openedx.slack.com/archives/C12M8M5AR/p1561975422019300). The conversation on https://github.com/edx/edx-platform/pull/15101 is also relevant.

*Dependencies*: None

*Sandbox URL*: TBD - sandbox is being provisioned.

*Merge deadline*: ASAP since this is breaking new installations/deployments.

*Testing instructions*:

1. Try to deploy a new edx-platform instance based on the `master` or `open-release/ironwood.master` branch. Observe that the deployment fails at the "code sandbox | Install base sandbox requirements and create sandbox virtualenv" step. The command that fails in that step is `/edx/app/edxapp/venvs/edxapp-sandbox/bin/pip2 install -i https://pypi.python.org/simple --exists-action w -r /edx/app/edxapp/edx-platform/requirements/edx-sandbox/base.txt`.

2. Deploy again, this time use the source branch of this PR and deploy an instance using the related `configuration` PR. Installation should now succeed.

*Author notes and concerns*:

1. Since this affects Ironwood as well, the fix has to be backported.

*Reviewers*

  • [ ] @pomegranited

  • [ ] edX reviewer[s] TBD

Status

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Guruprasad Lakshmi Narayanan

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Priority

Unset
Configure