Quick start: Python agent installation

If your Python application uses one of the supported WSGI web frameworks, use this quick-start guide to quickly get New Relic APM up and running.

For install instructions with more helpful contextual information, see Python agent installation.

Install steps

If your Python app uses a supported WSGI web framework (including Django), follow these steps to get New Relic working:

  1. Make sure you have your New Relic license key. (If you don't yet have a New Relic account, sign up to get one.)

  2. Install the newrelic Python package using pip by running:

    pip install newrelic
  3. Generate the agent configuration file by running the command:

    newrelic-admin generate-config YOUR_LICENSE_KEY newrelic.ini
  4. 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.

  5. 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:


[video link] For Python agent installation tips, watch this New Relic video (approximately 1 minute). The video also includes the optional but recommended step of setting your app name in the config file.

For more help

Additional documentation resources include:

Join the discussion about Python in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.