How to install Python Package on windows

In Python follow the steps to install other packages on windows:
For example: 
>>> import requests
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import requests
ImportError: No module named requests

To resolve this error:
1.     Go to this website https://pypi.python.org/pypi , Search  for the required package, here requests and pick the tar.gz file which you think is the latest.
2.     Open the tar.gz (requests-2.4.3.tar.gz) using 7zip or winrar or any other archive manager.
3.     There is a folder called "dist' inside the above tar.gz.
4.     Inside 'dist' folder there will be a ".tar" file named "requests-2.4.3.tar". Please note that this is the latest version when I downloaded the file.
5.     Double click the "requests-2.4.3.tar" file as mentioned above. You will find a folder with the same name “requests-2.4.3". Extract this folder to a specific location.
6.     Open Command Prompt. Change directory to the above location.
7.     Type in the command at prompt: >c:\Python27\python.exe setup.py install
8.     Note: I am using Python27, if you are using any other version, please change it your installed version.
9.     This will install the required packages. This can be verified under “C:\Python27\Lib\site-packages”. Here you will have your packages.
10.  Open your python shell.
11.  Type "import requests" on the screen and enter.


Comments

Popular posts from this blog

How to use a value between two different threads in Jmeter

Steps to Analyze AWR Report in Oracle

Correlation and checking in Results