mattlisiv / newsapi-python

A Python Client for News API
MIT License
376 stars 130 forks source link

ImportError: cannot import name 'NewsApiClient' #5

Closed fcsimon closed 6 years ago

fcsimon commented 6 years ago

Unresolved reference 'NewsApiClient' when attempting to import the client

mattlisiv commented 6 years ago

Hi @fcsimon ,

Are you using pip to install the package?

Thanks, Matt

fcsimon commented 6 years ago

Installed via PyCharm's project interpreter

fcsimon commented 6 years ago

Tested with Python3 IDE after installing with pip3, works fine. However, not with PyCharm IDE.

blitu12345 commented 6 years ago

I m also facing the same error on Ubuntu 16.04 pip3!

vdaita commented 6 years ago

same @blitu12345

vdaita commented 6 years ago
pip install newsapi-python

make sure you get the right package

sachin2404 commented 5 years ago

Installation error occurred while installing with anaconda prompt. command::"conda install -c kvedala newsapi-python" gives an error

brij1823 commented 5 years ago

Use this ,it may work:

from newsapi.newsapi_client import NewsApiClient

jstuart3 commented 5 years ago

from newsapi.newsapi_client import NewsApiClient

This worked for me. Thanks, man!

BarryDeCicco commented 4 years ago

brij1823's method worked for me!

pullynnhah commented 3 years ago

You have to install from newsapi-python not newsapi

vulongtran commented 3 years ago

I just had this error too.

ModuleNotFoundError: No module named 'newsapi'

I managed to get it working by running this command in my main django folder. pip install newsapi-python

salonysonawa123 commented 3 years ago

You have to install from newsapi-python not newsapi

thanks , it work for me

devindatt commented 2 years ago

brij1823's suggestion worked, awesome thank you! cli install: pip3 install newsapi notebook command: _from newsapi.newsapi_client import NewsApiClient_

vigneshss16 commented 2 years ago

It worked thank you.

krishna-vinci commented 1 year ago

if you ever get this error try: from newsapi import * it will import everything. just make sure right pip: pip install newsapi-python