Install PyWorkbench in developer mode#

Developer installation is specifically intended for project maintainers. This specialized installation is tailored to equip developers with the essential tools and resources required for effective contribution to the project’s development and maintenance. The developer installation assumes a certain level of technical expertise and familiarity with the project’s codebase, rendering it most suitable for individuals actively engaged in its continuous development and maintenance.

  1. Clone the repository:

    git clone git@github.com:ansys/pyworkbench
    
  2. Move inside the project and create a clean Python environment:

    py -m venv <venv>
    
    py -m venv <venv>
    
    python -m venv <venv>
    
  3. Activate the environment:

    <venv>\Scripts\activate.bat
    
    <venv>\Scripts\Activate.ps1
    
    source <venv>/bin/activate
    
  4. Install the project in editable mode, which means that any changes you make to the package’s source code is immediately reflected in your project without requiring you to reinstall it.

    python -m pip install --editable .
    

Verify your installation#

If Ansys Workbench is installed locally, you can verify your PyWorkbench installation by starting a Workbench server session on your local machine:

from ansys.workbench.core import launch_workbench

workbench = launch_workbench()