Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

python - Don't understand these ModuleNotFound errors

I am a beginner and learning Python. I have setup the environment with SublimeText and Python3.x

I am fine in creating code on Sublime and building it locally through Ctrl+B and for input() function I installed SublimeREPL and it works find up till now.

The issue I am facing is on Python interpreter. I am facing below error while import any package:

import tweepy

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tweepy'

I cannot even run a Python script from there. My Python path is below:

C:Userswaqas.FVCAppDataLocalProgramsPythonPython37-32

Demo.py and hello.py are the two scripts I wrote initially which I am trying to execute from Python Terminal, but it is showing below errors:

test.py

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'test' is not defined

Demo.py

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Demo' is not defined
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The initial Python download includes a number of libraries, but there are many, many more that must be downloaded and installed separately. Tweepy is among those libraries.

You can find, and download, tweepy from here:

https://pypi.org/project/tweepy/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...