Import matplotlib.pyplot as plt error

Im Geting maptlplot lib error ,whike im working on my project, so can some help me sort out this issue.

1 Like

hi @Smd_Sohail . Have you mentioned this library in requirements.txt file in your github repo?

1 Like

no is it mandatory create a requirements.txt file?

1 Like

@Smd_Sohail . Yes it is mandatory to maintain a requirements.txt file if you are deploying your app in streamlit cloud. Feel free to ask if anything occured.
Happy Streamliting

Can i get to know how to create it. Becausevof running this command pip freeze > requirements. txt it shows error no file found but the file is createc with 0kb size.

  1. file created even after error but the dize of file is 0kb.

  2. i tried to add manually the libraries and updated github repo and created the app again in streamlit, but it shows forum error.

@Smd_Sohail create requirements.txt in your root folder. I have seen your repo in github. Use the following packages in requirements.txt file in the root directroy.

Developing-an-Automated-Testing-Framework-using-Python
      ---- Ats.py
      ---- requirements.txt
      ---- DPSD- Comprehensive vaiva Quiz details.xlsx

requirements.txt as follows:-

streamlit
numpy
openpyxl
kivy
tk
tabulate

i have created now its s


howing this error

1 Like

Hi @Smd_Sohail . I have seen your GitHub. The error is the file named DPSD- Comprehensive vaiva Quiz details.xlsx is not in your GitHub repo. So you need to upload that file to your GitHub and remove that old location path to new location as follows:-

#old
data = pd.read_excel("C:\\Users\\syed\\OneDrive\\Desktop\\Final Project\\DPSD- Comprehensive vaiva Quiz details.xlsx")


#new
data = pd.read_excel('DPSD- Comprehensive vaiva Quiz details.xlsx')

The GitHub directory structure as follows:-

Ats.py
DPSD- Comprehensive vaiva Quiz details.xlsx
requirements.txt

Hope you understood

Happy Streamlit-ing :balloon:

1 Like

Github: sohail-drois/Ats

i need to remove old location in vs code or in github code


Once again, if streamlit is hosted, you don’t have access to your local computers file system, therefore these file paths will not work!

You need to remove in the GitHub

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.