Jump to content


Photo

[Solved] Installing Beautifulsoup (Bs4) Module On Johnny

BeautifulSoup module install johnny

  • Please log in to reply
8 replies to this topic

#1 emiraga

emiraga

    Newbie

  • Members
  • 3 posts

Posted 26 November 2017 - 12:13 PM

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



#2 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,568 posts
  • Gender:Male

Posted 26 November 2017 - 02:38 PM

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)?

#3 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,568 posts
  • Gender:Male

Posted 27 November 2017 - 05:30 PM

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

I just noticed that you put (bs4) in the title of the post. So you must mean python3.6 and beautifulsoup4.

There you go: https://krydos2.heli...in/modules36.py

#4 emiraga

emiraga

    Newbie

  • Members
  • 3 posts

Posted 28 November 2017 - 09:50 AM

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



#5 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,568 posts
  • Gender:Male

Posted 28 November 2017 - 03:32 PM

# 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


#6 emiraga

emiraga

    Newbie

  • Members
  • 3 posts

Posted 29 November 2017 - 10:15 AM

Man, you rock!



#7 nebulae

nebulae

    Newbie

  • Members
  • 2 posts

Posted 07 March 2018 - 10:46 AM

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?


#8 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,568 posts
  • Gender:Male

Posted 07 March 2018 - 03:16 PM

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


#9 nebulae

nebulae

    Newbie

  • Members
  • 2 posts

Posted 07 March 2018 - 03:48 PM

/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, 07 March 2018 - 04:18 PM.
fixed quotes






Also tagged with one or more of these keywords: BeautifulSoup, module, install, johnny

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users