python novice
python novice

Reputation: 379

from pytrends.pyGTrends import pyGTrendsnot working

I installed pytrends using this wheel file pytrends.whl and the below directories

 Directory of C:\Python35\Lib\site-packages\pytrends

09/15/2016  10:30 AM    <DIR>          .
09/15/2016  10:30 AM    <DIR>          ..
09/15/2016  10:30 AM             6,799 request.py
09/15/2016  10:30 AM                 0 __init__.py
09/15/2016  10:30 AM    <DIR>          __pycache__
               2 File(s)          6,799 bytes
               3 Dir(s)  323,016,486,912 bytes free

and

 Directory of C:\Python35\Lib\site-packages\pytrends-3.1.0.dist-info

09/15/2016  10:30 AM    <DIR>          .
09/15/2016  10:30 AM    <DIR>          ..
09/15/2016  10:30 AM             7,900 DESCRIPTION.rst
09/15/2016  10:30 AM                 4 INSTALLER
09/15/2016  10:30 AM             8,622 METADATA
09/15/2016  10:30 AM               878 metadata.json
09/15/2016  10:30 AM               835 RECORD
09/15/2016  10:30 AM                 9 top_level.txt
09/15/2016  10:30 AM               116 WHEEL
               7 File(s)         18,364 bytes
               2 Dir(s)  323,017,011,200 bytes free

And from here, unlike in any packages where the submodules the are imported are inside the package folder, This one basically contains no sumodules. It might be the way i installled the package. This ome liner ,

from pytrends.pyGTrends import pyGTrends

gives the following error:

Traceback (most recent call last):
  File "GoogleTrend.py", line 1, in <module>
    from pytrends.pyGTrends import pyGTrends
ImportError: No module named 'pytrends.pyGTrends'
Press any key to continue . . .

Or is it better to use gtrends module instead? i am using python 3.5.

Upvotes: 1

Views: 3588

Answers (1)

anti-destin
anti-destin

Reputation: 869

You should probably use from pytrends.request import TrendReq.

See example.py.

Upvotes: 5

Related Questions