python3 -m venv spyder-env source spyder-env/bin/activate
Finally I decided to give Spyder IDE5 a go. I installed it in a virtual environment as recomended in the official documentation.
My pc runs on PopOS 22 (debian/ubuntu). I installed the IDE using pip.
First create and activate a virtual environment in which to install Spyder.
python3 -m venv spyder-env source spyder-env/bin/activate
After activating your environment, to install Spyder:
pip install spyder
I was confused how to use the already existing python and other packages(outside ethe venv) in the new virtual environment.
Activate the environment using: source spyder-env/bin/activate Start a Python interpreter there by running the command python.
Run this:
import sys; sys.executable '/home/alex/spyder-env/bin/python'
Start Spyder and run the same command:
import sys; sys.executable
If the resulting paths are the same, then Spyder and the package are in the same environment. Otherwise, Install just the spyder-kernels(can be installed using pip) package into the myenv environment, and set your Python interpreter path in Spyder's Preferences to point to myenv's Python executable.
Once the setup is ready, Spdyder is called from terminal by first activating the virtual environment
source spyder-env/bin/activate
then call spyder
spyder