2

I am taking an info storage and retrieval class, and to complete an assignment we need to download and use the beautifulsoup package for python. I haven't used Python in years, so I'm very rusty and cannot seem to figure out how to download a Python package. I'm using Python 3 and have Windows 10. Most of what I've read involves just typing something into the command line, but my windows command line (cmd) doesn't even acknowledge that I have python downloaded.

'python' is not recognized as an internal or external command, operable program or batch file.

I understand that pip is the go-to for downloading packages, but cmd doesn't acknowledge that either. Maybe I'm just missing something since I haven't used Python in so long...

I'm hoping that somebody can give me a step-by-step approach on how to download this package. Thanks in advance.

zvone
  • 15,142
  • 2
  • 32
  • 66

5 Answers5

2
  1. Add your Python executable in your path.
  2. Then run python -m pip install bs4.

Now when using in your code, use from bs4 import BeautifulSoup.

1

First, you have to find where your Python installation is. Then, use the full path to python.exe to run pip, e.g.:

C:\Program Files\Python37\python.exe -m pip install bs4
zvone
  • 15,142
  • 2
  • 32
  • 66
1

Go to your desktop or where ever your python shortcut is. Right-click on it and find properties. Click on properties find the 'start in' tab and copy the file directory. open cmd and type 'cd (address)' now type python and hit enter. then type import pip and hit enter now type Ctrl + Z and hit enter. Now type python -m pip install bs4.

1

using pip install beautifulsoup4

you can refer at https://pypi.org/project/beautifulsoup4/

1

Go command prompt if you are using windows type: python -m pip install bs4 then open your code editor and type: from bs4 import BeautifulSoup

Shubh-py
  • 11
  • 2