I am trying sample code from “Python All-in-one for Dummies” by Shovic & Simpson, pg342.
The sample code contains the line:
from bs4 import BeautifulSoup
When I start the code with the VSCode debugger, I get an error:
Exception has occurred: ModuleNotFoundError
No module named ‘bs4’
The Anaconda environment shows the package beautifulsoup4 4.11.1 as installed.
How can this be fixed?
I’ve thought of removing the package using Anaconda but over 370 modules will be removed! And I am already using the sqlite module!
Thank you.
1 Like
John_Cole
nice to meet you.
The sample code contains the line:
from bs4 import BeautifulSoup
When I start the code with the VSCode debugger, I get an error:
Exception has occurred: ModuleNotFoundError
No module named ‘bs4’
The Anaconda environment shows the package beautifulsoup4 4.11.1 as installed.
The only problem with this is that the module hasn’t been imported, so check Anaconda’s Python PATH.
If you have another Python installed on your PC (also used by Blender, for example), Python will try to import that module.
If you want to use the modules included in Anaconda in a completely separated state, create a Conda environment and match it with the Python version used in “Python All-in-one for Dummies”. You can use it.
Please refer to the following URL for detailed usage.
https://docs.conda.io/projects/conda/en/latest/user-guide/index.html
Regards, you.
ktsh.tanaka.2020
Hello, Katsuharu, and thank you for taking time to help me out. I am new to Anaconda and greatly appreciate your advice.
I did indeed have a version conflict when I discovered I had a forgotten installation of Python. I deleted that old version and re-installed Anaconda. Problem solved. Thank you.
I have encountered another problem with library maintenance which I will post in the forum if my research reveals no solution
Be well.
John
1 Like

Dear John_Cole.
thank you for your reply.
The purpose of this community is also to “help each other”, so it doesn’t matter if you have trouble or post.
Of course, it doesn’t matter if it worked without any trouble.
At first, everyone is a beginner. Why not increase what you can do while listening to the advice of your colleagues?
And when you can do more, you can give feedback to your peers.
Regards, you.
ktsh.tanaka.2020