I have been following a tutorial and after following the steps as listed by the instructor, I am stuck with the error below:
C:\Users\Angel\Documents\Python Basic> & C:/Users/Angel/AppData/Local/Programs/Python/Python38-32/python.exe "c:/Users/Angel/Documents/Python Basic/pandaexample.py"
Traceback (most recent call last):
File "c:/Users/Angel/Documents/Python Basic/pandaexample.py", line 3, in <module>
import pandas
File "C:\Users\Angel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Users\Angel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\__init__.py", line 152, in <module>
from . import random
File "C:\Users\Angel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\random\__init__.py", line 181, in <module>
from . import _pickle
File "C:\Users\Angel\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\random\_pickle.py", line 1, in <module>
from .mtrand import RandomState
File "_bit_generator.pxd", line 14, in init numpy.random.mtrand
File "_bit_generator.pyx", line 40, in init numpy.random._bit_generator
File "C:\Users\Angel\AppData\Local\Programs\Python\Python38-32\lib\secrets.py", line 20, in <module>
from random import SystemRandom
File "c:\Users\Angel\Documents\Python Basic\random.py", line 2, in <module>
random.randint(1, 10)
AttributeError: partially initialized module 'random' has no attribute 'randint' (most likely due to a circular import)
here is the code
import time
import os
import pandas
while True:
if os.path.exists("files/temps_today.csv"):
data = pandas.read_csv("files/temps_today.csv")
print(data.mean())
else:
print("file does not exist")
time.sleep(10)
Please, your help is highly appreciated
PS: I successfully installed pandas