codelucas / newspaper

newspaper3k is a news, full-text, and article metadata extraction in Python 3. Advanced docs:
https://goo.gl/VX41yK
MIT License
14.07k stars 2.11k forks source link

"No module named 'newspaper'" after installation? #366

Closed Marthorax closed 7 years ago

Marthorax commented 7 years ago

Running on Mac OS X.

Installed newspaper3k without a hitch, however, iPython won't recognize newspaper as a module. Any solutions?

Specifically, the code it can't run is: from newspaper import Article

yprez commented 7 years ago

Not really familiar with OS X... did you install both newspaper and ipython in the same env?

leenabharambe commented 7 years ago

I installed newspaper on ubuntu. but same error occurred to me too. What to do?

codelucas commented 7 years ago

Hello @Marthorax and @leenabharambe, I'd like to replicate the exact sequence of events of your installation to get your error to help debug it.

What command(s) did you use to install? What OS do you use? Please paste everything and be as descriptive as possible. Thanks.

JSONValidator commented 7 years ago

On macOS we need use python3 file.py, not python file.py.

codelucas commented 7 years ago

Good point @JSONValidator, this is probably a common mistake that's been happening.

We should inject in python3 or python2 version checks in the top level newspaper module so people get a more readable error "You are using the wrong python version" instead of a cryptic import error.

kerchner commented 6 years ago

I'm working in a Jupyter iPython notebook, with Python 3, but experiencing the issue here where even after a successful !pip3 install newspaper3k, running import newspaper results in ModuleNotFoundError: No module named 'newspaper'.

I verified that !python --version returns Python 3.6.0 :: Anaconda custom (x86_64)

Any suggerstions, @codelucas ? Thanks! I'm excited to try this package.

galaxydirector commented 5 years ago

Same issue... I am on Debian

JimmyCollins commented 4 years ago

Same issue here on Windows, even after successful installation when I try to import in my Jupyter notebook I see this error message.

Cyfy-max commented 3 years ago

Same with @kerchner