In the previous article, we have written how to install Python through the Anaconda Bundle. The benefit of installing the Python through an anaconda, the bundle was to get Python and spider environment with the Ipython console in one executable file.
If you don't
want to go on anaconda, you can download the Python from its official website. Then to do that, you go over to
Python dot org, then click on download then there you have quite some different
versions of Python and the various operating systems. So you have to choose
accordingly as per your computer operating system and the latest version of
python 3.9.2.
Wait until
the file downloads, then just execute it for straightforward installation. Then
run it and go next, and you set the directory where you want to store it and
keep the options as default if you want and finish the end. Now Python should
be installed successfully on your computer with its default interpreter, and
you have it among your program.
So this is
the interactive shell where you can type code interactively. So you type in
code, and you get the output. But you can also access Python through your
command line, so you write Python, and you get the python shell again. Here
now, to install a library, you just use the Pip library. Now let's suppose we
have to install the pc sets library for the musical audio manipulation. It's
just a library for musical analysis.
If you don't
know how to install the library in Python, check out our previous articles.
So the
installation is straightforward. That's you see if you want Ipython, you can go
ahead and install it using Pip again. So Pip installs Ipython then you can
access the Ipython interpreter through the command line. Instead of writing
Python, you write Ipython, and then you get a shell with some extra
functionalities compared to the default python shell. So you can either choose
the default Python interpreter or Ipython. So that depends on your preferences.
But I use
Ipython myself. Now one last thing I want to show you is we looked at how to
write code interactively. Now I can show you how to write scripts of code, so
to do that, you just go to a folder and then create a script and name it with a
dot Py extension of the end. So dot Py [.Py] is python extension, and then
inside you write some code let's say the print sum of five and six and then run
it you go over to run and run module all you can even press F5 on your
keyboard.
Great the
script or script to save it. And then you get the output in the interactive
python console as you see.
So that's
what I wanted to show you have the editor here, and you have an interactive
shell here. Again I use spiders, so I have both that Ipython from Shell and the
editor in one single window.


0 Comments