virtualenvspyderpythoninterpreter

spyder set python interpreter at launch


I am trying to use Spyder with virtual environments. I have installed spyder-kernels and after launching Spyder, I can go into the gui and point to the correct python interpreter. Is there a way this can be done at launch so I don't have to go into the gui every time and update the interpreter when I change environment?


Solution

  • Not the answer you're looking for... but I was able to accomplish this by creating a script that modifies the following files before launching spyder. These two files are what get changed when you interactively change the interpreter in the preferences.

    This is on linux - the .ini files may be on a different path in Windows.