0

I'm on MacOS Catalina and I've created a python file with the contents being just

import beautifulsoup

And the crontab is setup as:

*/1 * * * * PYTHONPATH=$PYTHONPATH:/anaconda3/lib/python3.6/site-packages/ /Users/ABC/Downloads/downloading_tables.py  >> /Users/ABC/Desktop/cron.log 2>&1

But the logs keep throwing the error "No module named 'beautifulsoup'"

I tried adding pip install beautiful soup in the python file but it threw a syntax error on the word install.

What am i doing wrong?

Thanks!

RainmakerP
  • 17
  • 1
  • 6

1 Answers1

0

Use command

pip install bs4

to install Beautiful Soup and then import as :-

from bs4 import BeautifulSoup

Hope That Helps!

LFC
  • 50
  • 5
  • Thank you Samarth. This works. How do we get this to work with third party libraries such as Quandl, though? – RainmakerP Apr 22 '20 at 03:16
  • @diablojunk BeautifulSoup should work alongside Quandl. Just install Quandl using pip3 install quandl and you are ready to go – LFC Apr 22 '20 at 16:06