I'm a beginner level Python user. Up until today I was able to use installed packages(pandas, numpy and so on) at PyCharm. I try to download BeautifulSoup
and error msg took me to PyCharm web site. I followed instruction on my regular MacBook terminal (macOS Monterey 12.4
) where it told me to upgrade the pip
as pip3
and try the pip3 install beautifulsoup
. After this code I get this from terminal Requirement already satisfied
.
However since that update on terminal none of the packages on my PyCharm are working. PyCharm marks it with red underline, I click and choose install
again but still not working. This is what I get
Traceback (most recent call last):
File "/Users/ezgiwon/PycharmProjects/pythonProject1/main.py", line 1, in <module>
from bs4 import beautifulsoup4
ModuleNotFoundError: No module named 'bs4'
Also for the rest it's similar to this error couldn't find __innit__.py
I've read so many solutions here but some didn't work some I wasn't able to understand with my current knowledge.
I tried the 'edit configurations
', 'edit python interpreter
',also tried the built-in PyCharm terminal to upload those packages. I'm not sure how to fix this issue. I thought I could delete everything following a tutorial and start fresh but seems like I didn't clear all past files.
Now I have a new file under Library/Framework
for Python which I will be asking in separate question.
Please try to guide me as detailed as possible, much of these terms are new to me and really struggling to run PyCharm correctly. I really need it to run for simple study tasks as I was using it for very basic pandas and numpy calculations.
[interpreter][1]
[Paths][2]
[interpreter2][3]
CodePudding user response:
Have you tried:
pip install bs4
What happens when you pip install in Pycharm, do you get errors?
I would suggest setting up a virtual environment (venv).
CodePudding user response:
Apply this
pip install beautifulsoup4
then import like this
from bs4 import BeautifulSoup