question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no module named pytrends.request

See original GitHub issue

I am trying to run python 3.6 code in VS Code using the plugin, but it can’t find the module that I installed using pip3 install pytrends, throws an error, and quits:

Traceback (most recent call last): File “/Users/nathanparekh/python-project/…/fetch.py”, line 4, in <module> from pytrends.request import TrendReq ImportError: No module named pytrends.request

However, using VSCode “Run Python File in Terminal” works just fine.

How do I fix this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nathanparekhcommented, Dec 24, 2017

I think I found the problem, but I don’t know how to fix it: Code Runner doesn’t respect the selected python interpreter, so it is running using python 2.7 instead of python 3.6 where the module is installed. Is there any fix to this? For right now I’m using “Run Python File in Terminal” in the right-click menu that I think is built into Visual Studio.

0reactions
sravanstrnscommented, Sep 10, 2018

i am using python 2.7.14 along with the pip but i am also facing this issue

Traceback (most recent call last): File “E:\pytrends\pytrends-master\examples\example.py”, line 2, in <module> from pytrends.request import TrendReq ImportError: No module named pytrends.request

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'pytrends.request ...
Was trying to execute the github example from pytrends.request import TrendReq pytrends = TrendReq(hl='en-US', tz=360) .
Read more >
python - Cannot import pytrends? - Stack Overflow
from pytrends.request import TrendReq ... requests ModuleNotFoundError: No module named 'pytrends.request'; 'pytrends' is not a package.
Read more >
ModuleNotFoundError: No module named 'pytrends'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pytrends' How to remove the ModuleNot.
Read more >
pytrends - PyPI
pytrends. Introduction. Unofficial API for Google Trends. Allows simple interface for automating downloading of reports from Google Trends.
Read more >
Pytrends to get trending search suggestions for Keywords
ModuleNotFoundError: No module named 'pytrends' ... from pytrends.request import TrendReq pytrends = TrendReq() df = pytrends.trending_searches(pn='india') ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found