.. _install_popy:

Install |popy|
##################

.. _download_popy:

Downloading |popy|
===================

First, download the latest binary from:-

https://product.popypkpd.com/releases/

To access the url above you need to :ref:`obtain_a_web_account` for the |popy| product site, then login using your email address and a password.

We currently provide a **64-bit version** of |popy| for Windows 7/8/10. The download file is approximately 250Mb which will take around 5 minutes to download using a broadband connection.

.. note::

    If you have a previous version of |popy| installed, please :ref:`uninstall_popy` before installing the new version.

.. _installing_popy:

Installing |popy|
======================

Double-click on the |popy| installer:-

.. code-block:: console

    popy-1.1.0-win64-installer.exe

The installer places the software in a subdirectory called '|popy|'. We recommend |popy| is installed  in the root directory of the main drive, typically:-
 
.. code-block:: console

    c:\PoPy
 
A local user typically has write access to the c:\\ drive but not to c:\\Program Files unless the user is an administrator.

The installer will uncompress the |popy| files, just click on the .exe installer and follow the prompts. You will need approx 1.5Gb of disk space, and the install time may take 5 minutes or so depending on the speed of your computer. 

The installer also creates a desktop shortcut and Windows start menu shortcut under the name '|popy|', for the current user only.

The installer makes no changes to the Windows registry and does |not| require admin rights.

.. note::

    It is possible to install |popy| on a usb stick. However due to the way the |python| language operates, |ie| many .py files, this will have a significant performance impact. It is much better to install |popy| on the main hard drive of a computer.

.. _multi_user_installation:

Multi User Installation
-------------------------

The installer sets up |popy| for the current user only. To share a |popy| installation with another user, simply add the |popy| directory to their system path, so they can access the ‘popy_env.bat’ batch file. Windows start menu shortcuts can also be created manually, if desired.
 
.. _install_check_install: 

Checking your new |popy| Installation
=======================================

|popy| runs from the command line, typically called :term:`command prompt<dos prompt>` under Windows 7-9 or :term:`PowerShell<powershell prompt>` under Windows 10.  To access |popy| commands in the current command prompt, type:-

.. code-block:: console

    $ popy_env
 
This scripts sets up the environment variables so you can access |popy| commands. See :ref:`open_a_popy_command_prompt`.

To verify that |popy| is installed, execute the command:-

.. code-block:: console

    $ popy_info

If |popy| has successfully installed, output similar to that below will appear, providing detailed information on the installation:-
 
.. literalinclude:: popy_info_output_trial_mode.inc
    :language: console

The output above will vary depending on the :ref:`activation` status of |popy|.

If you want to run more rigorous tests then see :ref:`validate_popy`.

.. _wi10_inc_max_path: 

Win10 Increase max path length
===============================

Note if you use |popy| with deeply nested folder structures it is recommended that you increase the max file path length from the default Windows 10 limit of 260 characters, see here:-

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

For your convenience we have supplied the following registry editor file:-

.. code-block:: console

    conf/win10_allow_long_paths.reg
 
If you are using Windows 10 and have admin privileges, you can simply click on this file to remove the 260 character limit. Unfortunately this registry edit does |not| work on Windows 7.


.. _install_troubleshooting:

Troubleshooting
==================

If you have any problems with this installation process, and cannot find the answer on the :ref:`troubleshooting` page, then email us at |email|.

.. only:: browser

    .. _install_first_steps:

    First Steps after Install
    ==========================

    Congratulations, you have installed |popy| on your machine and can now begin to use this powerful population modelling software immediately. 
    
    To setup tabs correctly on your editor see :ref:`configure_editor`.

    See :ref:`simple_fit_example` for a walk through of a simple fitting example.



