Sublime Forum

Need help with beautifulsoup!

#1

Hey all! I’m very new to coding, and I’m currently trying to get beautifulsoup to work in Sublime. I’ve gone through the steps of installing the package control and finding the bs4 package included in the program, but I can’t seem to get it to work. Every attempt to import it ends with an error that says “no module named bs4 exists” and I’ve tried everything I can find to try and fix it, to no avail.

My knowledge on the subject is unfortunately too limited to really understand what’s going wrong, so I’m hoping to get some help so I can start working with it! Can provide screenshots if needed.

0 Likes

#2

You will have to provide more information on what it is you’re trying to do and what you did to install things so we can better understand what the problem is.

For example:

Generally speaking, Package Control isn’t required for you to be able to execute programs, it just installs Sublime Text packages (not Python packages). I’m also not sure of what the bolded part here means regarding finding the package included in the program.

That said, the most common problem people encounter with executing Python programs that revolves around installing a package but still getting the “no module named BLAH exists” message is generally related to having installed the Library with one version of Python and then trying to run your program with another. If you for example have two versions of Python installed, then the one can’t see the libraries of the other.

So, you may have an issue in that area as well.

0 Likes

#3

By the included package I specifically mean the one that comes up in the “install packages” menu of Package Control when you enter beautiful soup into the search bar for it. It’s called Beautiful Soup Completion iirc? But yeah, that hasn’t done anything for me as it isn’t working.

I did end up doing a search of my OS for anything related to Python installs, and ended up finding libraries for Python 3 and Python 3.10, as well as something related to Python 3.11. (Not sure how I ended up with 3 versions as I’ve only downloaded it once but! Whatever haha.) How would I go about getting rid of the extra versions and keeping just one? I’m assuming 3.11 is the most up to date, but there’s no python311.lib and none of the 3.11 files have been touched since August, from the looks of it.

Sorry for the odd questions, like I said I’m new to all this so it’s a learning experience.

0 Likes

#4

Beautiful Soup Completion contains only a sublime-completions file; if you’re in a Python file, the autocomplete menu will have items in it that are specific to Beautiful Soup (but they are not context sensitive such that they only appear in the list, not with any intelligence or regard to where you could use them).

Offhand, not sure on the section question other than to use the Add/Remove programs item in Windows to remove all of the items you don’t want.

0 Likes