Python Spyder IDE and Virtualenv
How do you use another virtual env in Python Spyder IDE?
- Activate the environment (e.g. myenv) you like to use
conda activate myenv
- Install the spyder-kernels package
conda install spyder-kernels=0.*
pip install spyder-kernels==0.*
- Run the following command inside the same environment
python -c "import sys; print(sys.executable)"
- Copy the path returned by that command to the textbox at Spyder > Preferences > Python Interpreter > Use the following interpreter
- Start a new IPython console and it should be using your myenv
Reference: