I am currently using Atom on Mac, and I get ModuleNotFoundError
: No module named 'bs4' when I execute my program.
I have tried the following solutions, but it did not fix the problem:
Used a virtual environment using venv
python3 -m venv projectname source projectname/bin/activate pip install bs4
Installed bs4 using different names:
pip install bs4 pip install beautifulsoup4 pip install BeautifulSoup4
All of which gives me the message, "Requirement already satisfied"
Deleting and reinstalling bs4
Setting the Atom Python to 'python3' under Atom config > packages > script > lib > grammars > python.coffee
I referenced multiple StackOverflow solutions similar to my question, but I was unable to solve the issue. Could there be something wrong about python on my laptop, or the setting in Atom?
If so, may I know what specific steps I will have to take? Thank you in advance.
My Setup:
Atom 1.55.0
Python 3.7.6
MacOSCatalina 10.15.5
Since you're using python3 -m venv
, you can equivalently use python3 -m pip install
Otherwise, it appears you're PATH has pip
binary pointing at some other Python, and maybe you should try pip3
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.