Can we change the version of Python interpreter that IPython uses?
I know there is IPython and IPython3, but the problem is, IPython uses Python2.7, and IPython3 uses Python3.4.2, and I see no way to change that.
What if I wanted IPython to use which ever version of Python interpreter I wanted, could I make it that way?
I want IPython to use the newest Python version, Python3.6. Can I make it that way?
To open the server settings, select Configure Jupyter Server in the list of the Jupyter servers. Configure the server options: To customize the default Jupyter server, in the Jupyter Server dialog, select Managed Server and from the Python interpreter list select any local Python interpreter.
To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Note: If the Python extension doesn't find an interpreter, it issues a warning.
To check the Python version in your Jupyter notebook, first import the python_version function with “ from platform import python_version “. Then call the function python_version() that returns a string with the version number running in your Jupyter notebook such as "3.7. 11" .
IPython is open source (BSD license), and is used by a range of other projects; add your project to that list if it uses IPython as a library, and please don't forget to cite the project. IPython supports Python 2.7 and 3.3 or newer.
Modifying a distributed file should be a last resort. I suggest this alternative using python3.6 on Ubuntu 17.04 as an example:
python3.6 -m pip install IPython # lots of output, make IPython available to script ipython3
python3.6 `which ipython3`
Python 3.6.1 (default, Mar 22 2017, 06:17:05)
[GCC 6.3.0 20170321] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
First off, please check what version (by version I mean, the path of the interpreter) of python IPython uses using the which ipython
command. Once you know the path, open the file and post the contents here.
Try to make it look like this:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from IPython import start_ipython
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(start_ipython())
The first line supposedly ensures that your local python interpreter is used. Commonly called a shebang line.
If you are on a Windows system, try the where ipython
command instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With