HomeSOFTWAREHow To Install Python And How To Program Online

How To Install Python And How To Program Online

Python 3 is the most modern language version, characterized by notable changes that make it incompatible with Python 2 and a fast-growing online community.

How To Install Python On Windows

To proceed with the installation on Windows, it is possible to do it through the Microsoft Store, which is recommended because it manages updates automatically and can also be uninstalled easily, or on the other hand, with the installer from the authority site. In the latter case, you can find the .exe file for the 32bit and 64bit Windows versions on the download page. Just run it and follow the various steps, remembering to select Add Python 3.X to Way thing toward the Start of the establishment. 

After that, by default, Python will be placed in C: \ Python 3X (e.g., C: \ Python35 for version 3.5). At this point, it is already possible to use it via Start> All Programs> Python3.5> Python. We were selected Add Python 3. X to PATH during installation, you should be able to start Python from the command prompt by simply typing the command py or py -3. In case, during the installation phase, we had not selected the above option, it is still possible to add Python to the PATH environment variable manually, following the following steps. 

Let’s go to Control Panel> System> Advanced System Settings> Environment Variables and modify the PATH variable among the system variables by adding C: \ Python3X (where the X corresponds to the installed version). To verify that everything went well, we start the command prompt ( Start> Run> cmd ) and type: echo% PATH%. If the output includes the string C: \ Python3X, you can start Python by simply typing py, py -3, or Python. If Python has been installed successfully, we will display a short message indicating the version of the Python interpreter, followed by the prompt (>>>).

How To Install Python On Linux

On  Linux systems, Python is often already present in the basic setup. However, it is possible to check their presence and the versions present. To do this, we type from the shell: $ Python or: $ python3. If both commands fail, Python is not installed. If Python starts Python 2 and the python3 command is not present, only Python 2 is installed. If the python or python3 command starts with Python 3, then Python 3 is installed. If Python 3 is not installed, you will need to install it using the package manager for Linux systems: apt for Debian-based distributions; rpm for Red Hat-based distributions. 

Alternatively, you can download and compile the Python sources manually. More in detail, depending on the system in use, it is possible to run one of the following commands: $ yum install python3 for distributions based on rpm packages, such as Red Hat, Fedora, Centos; $ apt-get install python3, for Debian-based distributions, such as Ubuntu. Finally, let’s see how to install Python by compiling the sources. First, we need to check the site’s latest version of the sources. Then we run the following commands:

$ cd / tmp

$ wget http://www.python.org/ftp/python/3.x/python-3.x.tar.bz2. In doing so, we downloaded a .tar.bz2 archive containing the Python sources. Now let’s extract the contents:

$ tar -xjf python-3.x.tar.bz2

$ cd python-3.x

All that remains is to begin the installation:

$ ./configure

$ make

$ sudo make install

Note: You can use make alt install instead of installing to prevent the version you just installed from being associated with the python command.

How To Install Python On Mac

We should find Python ready to use in Linux systems, even in Macs. Once again, launch a terminal window and type python to check this. Version 2.7 will probably be shown, but we want to use 3.X., So we need to visit the site and download the Mac OS version that best suits our needs. At last, we can continue with the establishment. At the end of the installation, running Python from the terminal will still show the old version. Therefore, you have to open the terminal and type:

vim ~ / .bash_profile

Once the file is open, we add the following line:

alias python = “python3”. Trying to run Python from the terminal again will boot version 3. X by default.

How To Use Python Online 

To start programming in Python without installing any software on the PC, you can use an online emulation tool which, in essence, allows the host system to emulate the qualities of a client system. They are free tools that will enable you to practice the programming language in a quick and undemanding way. Very useful to start programming. On the other hand, they inhibit many functions.

Also Read: How To Activate JavaScript

Technology Talkerhttps://www.technologytalker.com
Technology Talker is a well built blog which Provides you with all the Latest news about Technology, business, Marketing, Social Media etc.
RELATED ARTICLES

Latest Articles