How to use a different version of python in Jupyter
I wanted to see the new features of python 3.6, but the version that my Jupyter uses by default is the 3.5.1 (Anaconda 4.0.0). So I searched and I realized that I should use the following code to run the python 3.6 interpreter.
So
- You have to see where is the version you want
- write what you see below
I have checked the version importing the sys module and printing the sys.version.
Then I checked the Formatted string literals that is one of the new features in python 3.6. There is a thing: you have to write this line of text in each cell to use the 3.6 version, otherwise you will get back to the 3.5 version.
I have as default version the 3.6, but I still am not aware about changing the version in Jupyter. Anaconda stil has not his 3.6 version of python.
Then I checked the Formatted string literals that is one of the new features in python 3.6. There is a thing: you have to write this line of text in each cell to use the 3.6 version, otherwise you will get back to the 3.5 version.
I have as default version the 3.6, but I still am not aware about changing the version in Jupyter. Anaconda stil has not his 3.6 version of python.
%%script C:\Users\Utente\AppData\Local\Programs\Python\Python36-32\python.exe
import sys
print(sys.version)
print()
name = "Giovanni"
print(f'My name is {name}')
import sys
print(sys.version)
Comments
Post a Comment