DEV Community

मौसम अधिकरी
मौसम अधिकरी

Posted on • Updated on

Setting Up Environment For Python

Before Installing any software on your device consider the following
  • Whether your System is 32-bit or 64-bit
  • Which OS you are Using Mac/Linux/Windows
  • Memory space

Python is Pre-installed in Linux and Mac.

To open python shell:

  • open Terminal
  • Type Python
  • you will see

Python

  • Now Type the following there:

    >>>print("hello World!")
    hello World!
    
  • If you want to have python3 but getting python2.7 instead then run this in your bash shell

    $ echo "alias python=/usr/local/bin/python3" >> ~/.bashrc
    

what this does is this points python3,when python is called instead of python2.7.

For Windows

  • Download Python installation file from Python.org
  • After starting the installer, one of two options may be selected:

Python Installation Step

  • If you select “Install Now”:
    • Python will be installed into your user directory
    • The standard library, test suite, launcher and pip will be installed
    • If selected, the install directory will be added to your PATH.
  • On selecting Install Now, the setup process begins and wait for the installation to complete.

Alt Text

  • Once the installation completes, choose Close.

P.S. By selecting ‘Add Python 3.X to PATH’ will save some troublesome of adding PATH to your system variables.

Since you can't do all the stuffs in console so we need an Editor.
I use VS Code
but there are many different editors out there of your choice. like Sublime text , Atom , Pycharm and so on

For more Visit Here

Discussion (0)