Guide
Create and Use a Conda Environment as the Project Interpreter in JetBrains Dataspell
Learn how to create an isolated Conda environment with specific packages and set it as the interpreter for a Dataspell project to ensure reproducible data science workflows.
Published by Tasadduq Burney
29 Sept 2026, 07:04 UTC
3 min43K views0

Desired outcome
You want an isolated Conda environment containing the exact versions of libraries (e.g., numpy, pandas, scikit-learn) that your Dataspell project will use. Once configured, Dataspell will use that environment for code completion, debugging, and the Python console, giving you a reproducible workflow.
Prerequisites
- Dataspell version 2023.2 or later installed.
- Conda (Anaconda or Miniconda) installed and its
condaexecutable accessible from the system PATH. - A Dataspell project opened or created.
Procedure
- Open the Settings/Preferences dialog: Ctrl+Alt+S (Windows/Linux) or ⌘+, (macOS).
- Navigate to Project: <your‑project‑name> → Python Interpreter.
- Click the gear icon ► Add….
- In the left pane select Conda Environment.
- Choose the New environment tab.
- Fill in the fields:
- Name: e.g.,
ml-env - Base interpreter: leave as the detected Conda Python (or browse to
condaif needed). - Location: accept the default or specify a local SSD path for better performance.
- Python version: select
3.11(or another version required by your project).
- Name: e.g.,
- Optionally check Inherit global site‑packages if you need access to packages installed in the base Conda environment; otherwise leave it unchecked for full isolation.
- Optionally check Make available to all projects if you plan to reuse this environment elsewhere.
- Click OK. Dataspell will create the environment and then display it in the interpreter list.
- Select the newly created environment from the interpreter dropdown and click Apply.
- To install additional packages via the UI, open View → Tool Windows → Python Packages, ensure the environment is selected, and search/install
numpy,pandas,scikit-learn. - (Alternative) You can also create the environment from a terminal and then point Dataspell to it:
After creation, repeat steps 2‑5 but choose Existing environment and browse toconda create -n ml-env python=3.11 numpy pandas scikit-learn conda activate ml-env # verify python -c "import sys, numpy, pandas, sklearn; print('OK')"<conda‑envs‑path>/ml-env.
Expected checks
- The interpreter dropdown in Settings → Project → Python Interpreter shows the new environment (e.g.,
ml-env). - Open the Python console from the bottom toolbox and run:
The output should point to theimport sys; print(sys.executable)python.exe(orpythonbinary) inside the environment’s directory. - Run:
to confirm the expected packages are present.import numpy, pandas, sklearn; print(numpy.__version__, pandas.__version__, sklearn.__version__) - In the Python Packages tool window, the list should include numpy, pandas, and scikit-learn with the versions you installed.
Recovery options and limitations
- If the environment does not appear in the interpreter list, verify that Conda is on the PATH by opening a system terminal and running
conda info. The command should return version and environment information without error. - Invalidate Dataspell caches via File → Invalidate Caches / Restart if the UI still does not reflect the new environment.
- Creating the environment on a network‑mounted drive can slow down package indexing and code completion; prefer a local SSD location.
- Avoid mixing
conda installandpip installwithin the same environment unless you usepipfrom the activated Conda context (conda activate ml-env && pip install …). Mixing managers can lead to inconsistent package states. - Changing the interpreter requires restarting any running Python console or debug sessions to use the new environment.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.