Jump to content

Recommended Posts

Posted

Hi, I have noticed that a lot of modules have been explicitly asked for on this forum, so I would like to ask you if it is possible to install BeautifulSoup module for Python 3.6. I have seen that lxml is there, but I would need to completely rewrite my script for lxml. What is the procedure to add it globally or is there any way to which you can point me on how to set it up locally.

Thanks

Posted

Are you sure you mean beautifulsoup (which is not compatible with python3.6) and not beautifulsoup4 (which is)?

 

Or are you sure you mean python3.6 (which is not compatible with beautifulsoup) and not python2.7 (which is)?

Posted

Thanks a lot for a quick response.

However, I am not sure how much time is needed for this to take effect, but again this morning I have got the message from Cron Daemon:

File "/home/emiraga/Python/check_hrasnica.py", line 2, in <module>
from bs4 import BeautifulSoup
ImportError: No module named bs4

 

I don't think that it has to do with the downtime at (2017-11-30) at 06:00 AM UTC, because I am running my script at midnight, but correct me if I am wrong.

Thanks

Posted

# crontab -lu emiraga
0 0 * * * python /home/emiraga/Python/check_hrasnica.py
That means you're using Python 2.6.6 not 3.6 Change it to

0 0 * * * /usr/bin/python3.6 /home/emiraga/Python/check_hrasnica.py
  • 3 months later...
Posted

Hi folks!

 

My sever is Johnny but I am unable to use BeautifulSoup4. Python version check shows 2.6.6, but it requires 2.7+.
 
Please help help me to figure out how to do it?
Posted (edited)

 

/usr/bin/python    = 2.6.6
/usr/bin/python2.7 = 2.7.13
/usr/bin/python3.6 = 3.6.1

 

Thank you for your quick reply. :D

I don't know why it did not work when I first tried it.

Edited by Krydos
fixed quotes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...