Save a Custom Conda Environment (Tutorial)

 

Last modified 2026-03-05
 

Support

 

Save a Custom Conda Environment (Tutorial)

Abbreviations Key

 

 

 

 

env

environment

 

 

SDK

software development kit

HISE

Human Immune System Explorer

 

 

str

string

hp

hisepy

 

 

YAML, .yml

YAML ain't markup language

IDE

integrated development environment

 

 

 

 

At a Glance

This tutorial explains how to use the HISE UI and SDK to create a custom Conda environment for your IDE. A Conda environment is a directory that contains a collection of user-selected packages. You can curate your own set of Conda packages or use a collection that someone else configured and shared with you. Custom Conda environments are easy to export and trace for transparency and reproducibility. For details, see Use the Conda Environment (Tutorial).

The new HISE environment-selection prompt now handles many scenarios that previously required the save_custom_conda_environment() workaround. If you upload files while more than one Conda environment is available, HISE prompts you to choose which environment to associate with your data, which reduces the need to save a custom environment just to keep files and results tied to the correct setup. Use save_custom_conda_environment() when you need to formally save, register, or share a custom environment for reuse in HISE.

Required Packages

To import hisepy functions, every Conda and Pixi environment must contain the packages listed in the accompanying box.

For hisepy to load, your custom environment must include the following packages:

 

  • pandas

  • numpy

  • pyyaml

  • plotly

  • dash

  • python-kaleido

  • googlesearch

  • astor

  • ray-all

  • conda-pack

  • pyreadr

  • termcolor

  • tomli-w

 

Signature and Parameters


The box below shows the save_custom_conda_environment() signature, and the method parameters follow.

 

SDK Icon

 save_custom_conda_environment()

hp.save_custom_conda_environment(
    env_name: str,
    description: str,
    languages: list[str],
)

  

Parameter

Data type

Required or optional

Description

env_name

string

required

Name that appears in the HISE UI.

description

string

required

Description of the environment.

languages

list[string]

required

List of programming languages supported by the environment.

  Get Help

If you get stuck while creating your custom Conda environment, refer to the steps of this tutorial (examples are in Python unless otherwise specified). To use the baked-in help in your IDE, try one of the following commands.

PythonROutput
help(save_custom_conda_environment)help(saveCustomCondaEnvironment)Function signature, list of parameters, class, and a brief description of the method in a compact plain-text format
hp.save_custom_conda_environment??saveCustomCondaEnvironmentMethod signature, docstring (description), file location, and file type in more readable format
hp.save_custom_conda_environment??hise::saveCustomCondaEnvironmentSignature, docstring, file path, a verbose set of metadata, and the source code for the method

Still not working? File a Support ticket.


Instructions

 Create a YAML file

You can create your own .yml file or follow the preferred method outlined here. 

1. Navigate to HISE, and use your organizational email address to sign in.

2. From the top navigation menu in HISE, click RESEARCH > IDEs.

3. On the IDEs dialog page, click the boxed arrow icon on an IDE card to open an existing instance, or click CREATE IDE to create a new IDE instance.

4. Click Terminal.

5. Enter the following command:

conda env export > minimal.yml

A file named mimimal.yml appears in your sidebar. 

6. Click File > Download.

  Save Environment Programmatically or Upload YAML File

You can save your custom Conda environment programmatically, using the SDK (Method 1, preferred). If you're more comfortable with a manual approach, upload your YAML file through the HISE Conda Environments UI (Method 2, optional) You do not need to do both.

 Method 1 (Preferred)

 1. In the terminal, call the hp.save_conda_env() SDK method.

A. At the terminal prompt, enter python.

B. Enter import hisepy as hp.

C. Enter the SDK call. An example appears below, but your name and description may be different, and you might have selected either Python or R (not both, as shown here).

EXAMPLE


hp.save_custom_conda_environment("my_custom_env", "A custom Conda environment for data science.", ["python", "r"])
        

D. At the prompt, enter y to proceed.

 Method 2 (Optional)

1. Use the HISE UI to upload your YAML file.

A. From the top navigation menu in HISE, click RESEARCH Conda Environments.

B. On the Conda Environments page, click CREATE CONDA ENVIRONMENT.

C. In the Conda UI dialog box, enter the requested information, including the three required parameters.

i. In the Name* field, enter a name for your custom Conda environment.

ii. In the Description field, describe the environment itself or the research for which you plan to use it.

iii. In the Language field, enter Python, R, or both.

iv. In the Privacy Settings section, choose PRIVATE, SHARED, or SELECT USERS.

v. If you choose PRIVATE (the default setting), the environment will be available only to you.

vi. If you select SHARED, the environment will be available to all HISE users in your account.

vii. If you choose SELECT USERS, enter the email addresses of those with whom you want to share the environment.

viii. (Optional) In the Tags field, add one or more tags to help you or your colleagues identify the new IDE. 

ix. In the Upload an environment yaml file section, click CHOOSE FILE. 

a. Upload the minimal.yml file you created in Steps 1.1 to 1.6, above.

b. (Optional) Alternatively, upload your own .yml file.

If you create your own .yml file, you must pin the version numbers of your dependencies. Doing so preserves the traceability of your environment and the reproducibility of your work,

D. Click SAVE CHANGES.

 IMPORTANT

If you manually create a new Conda environment in your IDE (for example, using conda env create), use the following command to install Conda-pack in that new environment before saving or sharing it. This step is required for the save_custom_conda_environment() SDK method to work correctly and for others to reuse your environment. 

conda install conda-pack

 Use Your New Custom Conda Environment

1. In HISE, go to Research > Conda Environments.

             

2. On the Conda Environments page, to create an IDE using the new environment you just created, click the card for your new environment.

3. On the Environment Details screen, click CREATE IDE.

4. On the IDE Settings page, enter the requested information, and click CREATE. If you're not sure which settings to choose, see Create Your First IDE Instance (Tutorial).


6. (Optional) Check your email for confirmation that your build succeeded. If it didn't, you'll receive a notification that indicates why the build failed. If you can't solve the issue on your own, file a Support ticket and we'll figure it out together. 

 


Related Resources

 Use HISE SDK Methods and Get Help

Best Practices for HISE IDE Users

Use the Conda Environment (Tutorial)

Create Your First IDE Instance (Tutorial)