For install instructions with more helpful contextual information, see Python agent installation.
If your Python app uses a supported WSGI web framework (including Django), follow these steps to get New Relic working:
Install the newrelic Python package using pip by running:
pip install newrelic
Generate the agent configuration file by running the command:
newrelic-admin generate-config YOUR_LICENSE_KEY newrelic.ini
If you control how your web application or WSGI server is started, use the following New Relic admin script command in front of your typical startup command options:
NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program YOUR_COMMAND_OPTIONS
If you cannot run the admin script in this way, please read the general installation instructions for more context and other install options.
Start or restart your Python web application or WSGI server.
For install instructions with more detail and helpful context, see Python agent installation.
Video of install process
The video below shows a simple install of the New Relic Python agent:
For more help
Additional documentation resources include:
- New Relic for Python (an overview and system requirements for the Python agent)
- Python agent installation (a detailed walkthrough of the Python installation process)
- Python agent integration (integrating the Python agent into your application)
- Python hosting mechanisms (a list of additional documentation by hosting mechanism)
- Python hosting services (a list of additional documentation by hosting service)