Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install python modules/package using IDLE on Windows

I have a python script and begins as (just a part of it) -

import requests
from bs4 import BeautifulSoup
import itertools
import io
import re
import smtplib, os

Now, when I run it, it says missing requests module.

I've downloaded & installed 3 versions of Python from python.org, but still it seems that the packages are not installed. Can anyone tell me how to install modules using IDLE on Windows 7.

Versions I have - 2.7.8, 3.3.5, 3.4.2.

like image 620
PalashV Avatar asked Dec 08 '22 05:12

PalashV


1 Answers

Under present versions of Python (version 3.4 or above), do the following:

Windows

At the command prompt enter

py -3 -m pip install BeautifulSoup4

Linux

At the terminal enter

sudo python3 -m pip install BeautifulSoup4
like image 143
TheHolyDarkness Avatar answered Dec 11 '22 11:12

TheHolyDarkness