Feb-08-2020, 07:32 PM
Hello everyone.
I know some computer science concepts and can write programs in Python, which I have done but for my own use in the shell. However, there is a considerable amount of gaps I need to fill before moving forward with my learning.
I've been reading the guide on Installing Packages and tried to see my python version with
Actually, I am confused by the following from the documentation:
What do they mean by "the currently running notebook"?
An additional question I have regarding this is about the difference between
Thanks in advance.
I know some computer science concepts and can write programs in Python, which I have done but for my own use in the shell. However, there is a considerable amount of gaps I need to fill before moving forward with my learning.
I've been reading the guide on Installing Packages and tried to see my python version with
In [1]: import sys !{sys.executable} --versionBut I got an error saying "'C:\Users\<User>' is not recognized as an internal or external command, operable program or batch file." Now, when I do
!python --version
I get Output:Python 3.7.0
I tried to see what path I am getting with sys.executable
and is this oneOutput:'C:\\Users\\<User>\\Anaconda3\\pythonw.exe
Is this incorrect?Actually, I am confused by the following from the documentation:
Quote:It’s recommended to write {sys.executable} rather than plain python in order to ensure that commands are run in the Python installation matching the currently running notebook (which may not be the same Python installation that the python command refers to).
What do they mean by "the currently running notebook"?
An additional question I have regarding this is about the difference between
!python --version
and sys.version
. What I can see is that the former is a command-line command and the latter is an attribute of the sys module, and also that it gives me an installation date and some short info about my system. Is there any advantage or difference I am not seeing?Thanks in advance.