virtualenv IPython in Spyder not working
the process is described in the following link :
https://github.com/spyder-ide/spyder/wiki/Working-with-packages-and-environments-in-Spyder
It is recommended to install a modular approach with spyder-kernels:
- activate the environment where you want to work (ex :
source env/bin/activate
) - install the kernel in the environment by typing :
pip install spyder-kernels==0.*
- get the interpreter path to be used by typing :
python -c "import sys; print(sys.executable)"
- copy this path
- enter the path in Spyder in the menu
Preferences > Python Interpreter > Use the following interpreter
that should work, happy coding!
After you correctly enter the path to the Python interpreter in your virtualenv (i.e. /home/mike/envs/sci/bin/python
, not /home/mike/envs/sci/bin/ipython
), you just need to go to the menu
Consoles > Open an IPython console
and, as long as you have IPython and PyQt/PySide installed in your virtualenv, an IPython console will be opened for you using the IPython version of your virtualenv.