python-logoWelcome to the introductory Python post.

Using Python in Linux is not a big deal as Python comes preinstalled in most of the distros. Required versions can also be easily installed in Linux. It is Windows that needs some work for setup. So let’s get started.

Installing Python

Installing Python requires installing from the Python setup file. Just grab the Python installer file. These are the links to 64 bit installer.  Please download the correct version for your system.

  • Python3(latest as of this writing)
  • Python2(latest as of this writing)

Just download the required Python version file. I recommend downloading the offline installer. Once you install the file you’ll be able to use Python. Go to start and run Python. An application named IDLE will be displayed. You can start Pythoning from that application. Python installation is complete.

Setting Environment Variables

Once you install Python, you need to setup Python environment variable so that you would be able to use Python from Windows command line. Hit Start and search for environment variables. You’ll see something like Edit the system environment variables option. You can also access it from Computer properties.

Goto Advanced -> Environment Variables -> Path -> Edit and add Python directory separated by semicolon in Variable name. In my system it is C:\Users\pramesh\AppData\Local\Programs\Python\Python35-32. Have a look at screenshots below.

python_ev1 python_ev2

python_evfinal

After finishing these steps, open your command line and hit python. You’re all set to use python from Windows command line.

Installing Python Modules

Goto the folder you’ve set in PATH from above step. In that folder there is a folder named Scripts. Add that too to PATH. For me its C:\Users\pramesh\AppData\Local\Programs\Python\Python35-32\Scripts.

Once you’ve set it up, you can use pip and easy_install command from command line. These commands will help you to install Python modules.

For eg: to install Pyoo module, hit command pip3 install pyoo.

Please drop comments for any queries/suggestions. I’ll see you in the next one. Cheers 🙂

Advertisements