# PoPy Activation

PoPy comes with a 60 day trial period. To continue using PoPy after this period has expired, you will need a licence to activate the product.

## Licensing

There are currently two licences for PoPy:-

PoPy Academic Licence

  A free licence for PoPy distributed to academics, which may not be used for commercial analyses.

PoPy Commercial Licence

  A paid licence granting the end user one year of PoPy usage on a single machine. A commercial license is required to use PoPy in regulator submissions or publications regarding work that is sponsored or funded by drug companies i.e. research that leads to profit.

Both licences comes with a 60 day trial period, so you can try out PoPy before obtaining a product key.

All versions of PoPy have the same functionality. There are no crippled versions.

Any version of PoPy can be upgraded to the latest version of PoPy at any time. The terms of the licence (i.e. duration etc.) are unaffected by upgrading PoPy.

Please email info@popypkpd.com for further information or to obtain a licence.

## Activate PoPy

PoPy comes with a 60 day trial period. To continue using PoPy after this period has expired, you will need to email info@popypkpd.com to get a licence.

When you have a licence key, Open a PoPy Command Prompt and type:

    popy activate <product_key>

(where `<product_key>` is the product key we sent to you in an email) to activate your PoPy installation.

## Activation Status

Once you have activated your PoPy installation, Open a PoPy Command Prompt and type:-

    popy info

and you should see something like this:-

    INFO - In a PoPy Binary environment
    INFO - popy_flavour=binary
    INFO - popy_python_path=C:\PoPy\
    INFO - popy_release=<X.Y.Z>
    INFO - popy_version=academic
    INFO - python_version=3.8.6
    INFO - windows_version=('10', '10.0.17134', 'SP0', 'Multiprocessor Free')
    INFO - machine_name=mickey
    INFO - product_key=<XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX>
    status=Product key is activated and within licence period
    Licence has been running for 3613 days
    Licence needs renewing in 1868 days
    INFO - name=Phil Tresadern
    INFO - email=phil@popypkpd.com
    INFO - company=Wright Dose Ltd
    INFO - licence_start_date=2009-02-12 00:00:00
    INFO - licence_end_date=2024-02-16 00:00:00
    INFO - should_run=True

showing the paths used by PoPy, a few internal variables, and details about the licence (if you have run popy activate successfully).

If you see output like this:-

    INFO - product_key=None

Then PoPy is not yet activated. The trial period may or may not be active, which determines if PoPy will run without a product key.

If you have a product key, but this line is displayed:-

    INFO - should_run=False

Then the product key is invalid and you need to obtain a new product key to successfully Activate PoPy.

## Deactivate PoPy

To remove a PoPy product key from your machine Open a PoPy Command Prompt and type:-

    popy deactivate

### Verify Deactivation

Run:-

    popy info

and you should see something like this:-

    INFO - product_key=None

## Transfer Product Key Between Machines

If you wish to move a PoPy licence from one computer to another. Then you simply need to Deactivate PoPy on the current machine, noting the current product key. And then :ref:activation_activate` on the new machine, using the same product key.

Note if you activate the same product key on multiple machines and you exceed the number of activations associated with the product key, this will invalidate your licence and may cause problems.