Usage instructions#

Installing the Ansys Python Manager#

First step is installing the Ansys Python Manager. In order to do so, follow the next steps.

  1. Download the necessary installer from the latest available release. The file should be named Ansys-Python-Manager-Setup-v*.exe.

  2. Execute the installer.

  3. Search for the Ansys Python Manager and run it.

The Ansys Python Manager window should appear at this stage.

Prerequisites:

  1. OS supported for Ubuntu(20.04 and 22.04).

  2. Update apt-get repository and install the following packages with sudo privileges: wget, gnome, libffi-dev, libssl-dev, libsqlite3-dev, libxcb-xinerama0 and build-essential packages with sudo privileges

    sudo apt-get update -y
    sudo apt-get install wget gnome libffi-dev libssl-dev libsqlite3-dev libxcb-xinerama0 build-essential -y
    
  3. Install zlib package

    wget https://zlib.net/current/zlib.tar.gz
    tar xvzf zlib.tar.gz
    cd zlib-*
    make clean
    ./configure
    make
    sudo make install
    

To install the Ansys Python Manager, follow below steps.

  1. Download the necessary installer from the latest available release. The file should be named Ansys-Python-Manager_*.zip.

  2. Execute the below command on the terminal

    unzip Ansys-Python-Manager_*.zip
    ./installer.sh
    
  3. Search for the Ansys Python Manager and run it.

The Ansys Python Manager window should appear at this stage.

To uninstall the Ansys Python Manager, follow below steps.

  1. Go to File menu. Click Uninstall option.

  2. In the pop up window:

    • If you want to remove all virtual environments which were created by the Ansys Python Manager as part of uninstallation, mark Delete virtual environments checkbox

    • If you want to remove all configurations as part of uninstallation, mark Delete configurations checkbox

    • If you want to remove all Python installations which were installed by the Ansys Python Manager as part of uninstallation, mark Delete Python installations checkbox

  3. Click Uninstall button.

Prerequisites:

  1. OS supported for CentOS9 and RHEL9.

  2. Update yum repository and install the following packages with sudo privileges: wget, gnome-terminal, Development Tools, libffi-devel, openssl-devel, rpm-build, sqlite-devel, sqlite-libs, libXinerama-devel, coreutils

    sudo yum update -y;
    sudo yum groupinstall 'Development Tools' -y;
    sudo yum install wget gnome-terminal libffi-devel openssl-devel rpm-build sqlite-devel sqlite-libs libXinerama-devel coreutils -y;
    
  3. Install zlib package using wget

    sudo yum install wget -y
    wget https://zlib.net/current/zlib.tar.gz
    tar xvzf zlib.tar.gz
    cd zlib-*
    make clean
    ./configure
    make
    sudo make install
    

To install the Ansys Python Manager, follow below steps.

  1. Download the necessary installer from the latest available release. The file should be named Ansys-Python-Manager_linux_centos_*.zip.

  2. Execute the below command on the terminal

    unzip Ansys-Python-Manager_linux_centos_*.zip
    ./installer_CentOS.sh
    
  3. Search for the Ansys Python Manager and run it.

The Ansys Python Manager window should appear at this stage.

To uninstall the Ansys Python Manager, follow below steps.

  1. Go to File menu. Click Uninstall option.

  2. In the pop up window:

    • If you want to remove all virtual environments which were created by the Ansys Python Manager as part of uninstallation, mark Delete virtual environments checkbox

    • If you want to remove all configurations as part of uninstallation, mark Delete configurations checkbox

    • If you want to remove all Python installations which were installed by the Ansys Python Manager as part of uninstallation, mark Delete Python installations checkbox

  3. Click Uninstall button.

  4. Follow the uninstaller script & provide sudo permission to uninstall the application.

Prerequisites:

  1. OS supported for Fedora39.

  2. Update yum repository and install the following packages with sudo privileges: wget, gnome-terminal, Development Tools, libffi-devel, openssl-devel, rpm-build, sqlite-devel, sqlite-libs, libXinerama-devel, coreutils

    sudo yum update -y;
    sudo yum groupinstall 'Development Tools' -y;
    sudo yum install wget gnome-terminal libffi-devel openssl-devel rpm-build sqlite-devel sqlite-libs libXinerama-devel coreutils -y;
    
  3. Install zlib package using wget

    sudo yum install wget -y
    wget https://zlib.net/current/zlib.tar.gz
    tar xvzf zlib.tar.gz
    cd zlib-*
    make clean
    ./configure
    make
    sudo make install
    

To install the Ansys Python Manager, follow below steps.

  1. Download the necessary installer from the latest available release. The file should be named Ansys-Python-Manager_linux_fedora_*.zip.

  2. Execute the below command on the terminal

    unzip Ansys-Python-Manager_linux_fedora_*.zip
    ./installer_Fedora.sh
    
  3. Search for the Ansys Python Manager and run it.

The Ansys Python Manager window should appear at this stage.

To uninstall the Ansys Python Manager, follow below steps.

  1. Go to File menu. Click Uninstall option.

  2. In the pop up window:

    • If you want to remove all virtual environments which were created by the Ansys Python Manager as part of uninstallation, mark Delete virtual environments checkbox

    • If you want to remove all configurations as part of uninstallation, mark Delete configurations checkbox

    • If you want to remove all Python installations which were installed by the Ansys Python Manager as part of uninstallation, mark Delete Python installations checkbox

  3. Click Uninstall button.

  4. Follow the uninstaller script & provide sudo permission to uninstall the application.

Installing Python#

Now, instructions on how to install Python from the Ansys Python Manager are provided.

In order to do so, just follow the upcoming steps:

  1. Search for the Ansys Python Manager and run it.

  2. Go to the Install Python tab, and select your desired Python install, version and extra packages.

  3. And follow the install process.

Configurable options for the installer#

Two Python options for installation are available:

  • Standard: this mode installs the standard Python version from python.org

  • Conda (miniforge): this mode installs the Python version from miniforge. This install is characterized for being a modified conda install in which you have access to the conda package manager through the conda-forge channel.

Regarding the available Python versions, users can select among the following ones:

  • Python 3.8

  • Python 3.9

  • Python 3.10

  • Python 3.11

  • Python 3.12

Linux : Python installation
  1. Conda python installation:

  1. Bash scripts will be downloaded and executed on a machine directly from the official website.(conda-forge/miniforge).

  1. Standard python installation happens in two ways:

  1. If the Debian version is 22.04 and Python 3.11 (recommended by Ansys) is specified, the installer will automatically install the pre-compiled version of Python available within the installer.

  2. Otherwise, Python will be installed following these steps:

  1. Download Python Tarball and Untar:

  1. The Python tar file will be downloaded from the Python FTP server (https://www.python.org/ftp/python) based on the version selected from the dropdown menu. Example: For Python version 3.8.11, the download link would be here(https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tar.xz).

  2. Decompress the downloaded file in the user’s cache directory.

  • Configure the Source:

    1. Following will be executed configure the installation:

    ./configure --prefix=~/.local/ansys/{python_folder_name}
    
  • Build and install Python:

    1. Build and install Python using the make and make install commands.

Warning

In the case of having selected Conda (miniforge), only Python 3.10 is available.

Create Python virtual environment#

  1. Search for the Ansys Python Manager and run it.

  2. Access the Create Python Environments tab.

  3. Select your desired Python version from the listed options.

  4. Provide the name of the virtual environment in the Enter virtual environment name text box.

  5. Finally, Click Create button to create.

By default, Ansys Python Manager create virtual environment under,

  • {user directory}/.ansys_python_venvs for Windows

  • {user directory}/.local/ansys/.ansys_python_venvs for Linux

To configure the default virtual environment creation path, go to the File >> Configure section (Ctrl + D) and provide your preferred path under the first text box. Then, click the Save button.

Managing Python environments#

Through the Ansys Python Manager, users can also have access to their different Python installations. Have a look at how to access it here:

  1. Search for the Ansys Python Manager and run it.

  2. Access the Manage Python Environments tab.

  3. Select your desired Python environment and start one of the listed options.

By default, Ansys Python Manager list python environments available under,

  • {user directory}/.ansys_python_venvs for Windows

  • {user directory}/.local/ansys/.ansys_python_venvs for Linux

To manage this directory, go to the File >> Configure section (Ctrl + D) and make the appropriate changes.

  1. To add a new default directory path, provide the path in the corresponding text box.

  2. To add a new path where virtual environments are searched for, provide the path in the corresponding text box and click the Add button.

  3. To remove directory path select the respective path that you want remove from the dropdown and click the Remove button.

  4. Finally, click the Save button to save the configurations.

On the Launching options section, the following options are available:

  • Launch Console: this option starts a console window with the command python pointing towards your selected Python environment.

  • Launch VSCode: this option starts a Visual Studio Code. If Visual Studio Code is not installed, then the Ansys Python Manager provides instructions to install it.

  • Launch JupyterLab: this option starts a JupyterLab session. If JupyterLab is not installed, then the Ansys Python Manager installs it for you.

  • Launch Jupyter Notebook: this option starts a Jupyter Notebook session. If Jupyter Notebook is not installed, then the Ansys Python Manager installs it for you.

  • Launch Spyder: this option starts a Spyder IDE session. If Spyder is not installed, then the Ansys Python Manager installs it for you.

On the Package management section, the following options are available:

  • Install Python default packages: by selecting this option, your selected Python install receives the latest compatible versions for numpy, scipy, pandas, matplotlib, pyvista, and scikit-learn.

  • Install PyAnsys: by selecting this option, your selected Python install has access to the latest, compatible PyAnsys metapackage installation. This metapackage provides you with access to the latest public PyAnsys libraries in their compatible version with the latest Ansys products.

  • List installed packages: by selecting this option, a list of the installed packages on your selected Python install is provided. This might be useful for identifying potential problems.