我开始学习python 我在Windows机器上安装了python 但是当我运行脚本时,解释器会告诉我另一个文件的错误 例如,我运行googlereq.py,他向我显示了learning.py错误 这在REPL上不会发生 你能帮我吗 这让我发疯
Windows 10专业版上的python3
import requests
requests.get('https://google.com')
C:\Users\Rami\Desktop>python findmyacc.py
Traceback (most recent call last):
File "findmyacc.py", line 1, in <module>
import requests
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\__init__.py", line 43, in <module>
import urllib3
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 3, in <module>
import logging
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\logging\__init__.py", line 26, in <module>
import sys, os, time, io, traceback, warnings, weakref, collections.abc
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\traceback.py", line 5, in <module>
import linecache
File "C:\Users\Rami\AppData\Local\Programs\Python\Python37-32\lib\linecache.py", line 11, in <module>
import tokenize
File "C:\Users\Ramo\AppData\Local\Programs\Python\Python37-32\lib\tokenize.py", line 35, in <module>
from token import *
File "C:\Users\Rami\Desktop\learning.py", line 2, in <module>
r = requests.get('https://www.facebook.com')
AttributeError: module 'requests' has no attribute 'get'