Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Sunday, 26 June 2016

Python Environment Setup

Binaries of the latest version of python 3  are available on its official site.


For Windows:

You need to download the .zip file and extract it locally, It can be x86 or x64 depending on your operating system.

Following options available for that.

Windows x86-64 embeddable zip file
Windows x86 executable installer
Windows x86 web-based installer
Windows x86-64 executable installer
Windows x86-64 web-based installer
Windows x86 embeddable zip file


Double-click on the installer file and follow simple instructions.


Setting up PATH :

Executable files can be in many directories, so OS provides search path that lists the directories that OS looks for it.

You can set PATH from command line also, like go to command line and 
type path %path%;C:\[Python folder name] and press Enter.


The other way of doing this is to go to environment variable setup page and add the location of python dir to PATH variable.



Now go to command prompt and type python --version, you should get a version of python as the result.




For Linux:

For Linux, there are different types of that, and each flavor uses different package managers.

On ubuntu, python 3 can be downloaded using the following command.

$sudo apt-get install python3-minimal


Setting path Linux:


For csh shell: type setenv PATH "$PATH:/usr/local/bin/python3"

For bash shell (Linux): type export PYTHONPATH=/usr/local/bin/python3










Friday, 1 January 2016

Installing pip(Python package manager)

'pip'  is consider best package manager for python. It makes the installation easy for user.

Here are the steps to install pip. Before we install pip Python must be installed in system.

Note: PATH variable must be set for python. 

Refer my post  Installing Robot Framework with Python(an interpreter) using 'Selenium2Library' as library for more information on setting PATH variable and more information.

Go to https://bootstrap.pypa.io/get-pip.py and copy all content of this page to one file in local system and name it as 'get-pip.py'.
.py is python extension.

Now open command prompt and navigate to the folder where get-pip.py file is located.

e.g. d:\pip\

Run following command: python get-pip.py

It will install all required file for pip and we are ready to go with smooth installation.