Python Forum
About .profile and ImportError: No module named
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About .profile and ImportError: No module named
#1
ImportError: No module named

This error has been a hindrance in the last 24 hours for this start of walk with Python.

Already tried:
from bs4 import beautifulsoup4
and
import beautifulsoup4

I'm working on a MacOS version 10.13.6
I have 2 Python installed, the original MacOS and Python3.7.
 

In Terminal, when I type pip3.7 list, the library that I need appears:



Package Version
-------------- ---------
beautifulsoup4 4.6.3



In the .profile file, it says:
/ Usr / bin / bin / usr / bin / bin / usr / sbin / sbin / bin / usr / bin / usr / bin /
export PYTHONPATH



Honestly, it seems unbelievable that this error persists.

If anyone can help me?

Libraries in Python 2 are imported normally, without error.

thankful
Reply
#2
Use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
Also, when post traceback, ALWAYS post the full traceback you get, in error tags.
(Aug-28-2018, 12:45 AM)RicardoAbdala Wrote: Libraries in Python 2 are imported normally, without error.
Did you install bs4 also for python3.7? If not - you installed it only for python2. You need to install external packages in the python installation you want to use them with.
By the way it's from bs4 import BeautifulSoup
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ModuleNotFoundError: No module named 'openai' Tom_Hack 3 1,290 Mar-19-2025, 09:05 PM
Last Post: snippsat
  How to profile tornado web app ? umen 2 2,114 Oct-09-2023, 05:59 PM
Last Post: noisefloor
  No module named theapp Clives 10 9,214 Jun-10-2021, 11:16 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named "requests" BushFacts 1 6,701 Jan-13-2020, 06:49 AM
Last Post: perfringo
  Django getting ModuleNotFoundError: No module named '=' Malt 0 3,631 Aug-30-2019, 08:34 AM
Last Post: Malt
  No module named flask_themes voipsense 4 5,901 Feb-25-2019, 06:54 PM
Last Post: voipsense
  RelatedObjectDoesNotExist: User has no profile. Django 1.11 m0ntecr1st0 1 13,644 Feb-21-2019, 01:00 AM
Last Post: m0ntecr1st0
  ImportError: No module named django.core.exceptions in google app engine timtinan37 4 6,074 Jun-18-2018, 01:34 PM
Last Post: Larz60+
  ImportError: No module named '_sqlite3' armanmax11 5 23,040 Dec-16-2017, 02:13 PM
Last Post: Larz60+
  I need request POST for Facebook in My Profile Kalet 4 5,510 Sep-27-2017, 05:53 PM
Last Post: Kalet

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020