The naive approach
To use Spyder with another environment, the simplest way is to just
install it directly into the environment from which you’d like to use
the packages in, and run it from there. This works with all Spyder
versions and should require no extra configuration once the IDE is
installed; however, it results in multiple installations to manage and
isn’t as flexible or configurable as the alternative. Therefore, when
dealing with multiple environments, we recommend the modular
The modular approach
Starting with Spyder 3.3.1, you can install the modular
spyder-kernels package into any Python environment (
virtualenv/venv, system Python, WinPython, etc) in
which you wish to work, and then change the Python interpreter used by
Spyder on its IPython consoles to point to the Python executable of
This takes a small amount of preparation and configuration, but is
much “lighter” and quicker than a full Spyder installation into that
environment, avoids dependency conflicts, and opens up new workflow
To achieve this, follow these steps:
1- Activate the environment (e.g.
myenv) in which you’d like to work (e.g. with
conda activate myenv for conda,
source myenv/bin/activate or
workon myenv for virtualenv/venv, etc)
2- Install the
spyder-kernels package there, with the command:
conda install spyder-kernels if using conda/Anaconda,
pip install spyder-kernels if using pip/virtualenv.
5- After installing via either method, run the following command inside the same environment:
python -c "import sys; print(sys.executable)"
and copy the path returned by that command (it should end in
pythonw.exe, depending on your
6- Deactivate that environment, activate the one in which Spyder is installed (if you’ve installed it in its own environment) and start
Spyder as you normally would.
7- After Spyder has started, navigate to
Preferences > Python Interpreter > Use the following interpreter and paste the path from
Step 3 into the text box.
8- Start a new IPython console. All packages installed in your
myenv environment should be available there. If conda is used, the
name of the current environment and its Python version should be
displayed in Spyder’s status bar, and hovering over it should display
the path of the selected interpreter.