-2

I am new to Python and today I received a Python 2 script and would like to run it. Never worked with Python, but the code looks straight forward. The issue is, that right at the beginning there is:

import requests, sys, os, re import unicodecsv as csv from lxml import html from bs4 import UnicodeDammit from lxml import etree 

And I'm not sure how to install these dependencies. I googled around and figured that some 'requirements.txt' file would help, but I have not received it.

So how or whats the best way to install these dependencies please?

2
  • 1
    pip install requests for "requests" library Commented Nov 10, 2018 at 17:10
  • pip install beautifulsoup4 for "bs4". pip install lxml for "lxml". pip install unicodecsv for "unicodescv" Commented Nov 10, 2018 at 17:15

1 Answer 1

0

Thank you for the comments.

Looks like pip is the package manager so to speak for Python and the packages you stated worked.

pip install requests pip install beautifulsoup4 pip install lxml pip install unicodecsv 

Thank you again!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.