ERROR: Invalid requirement: '-'
WARNING: You are using pip version 22.0.3; however, version 22.3.1 is available.
You should consider upgrading via the '/home/appuser/venv/bin/python -m pip install --upgrade pip' command.
Checking if Streamlit is installed
[12:40:32] ❗️ installer returned a non-zero exit code
[12:40:32] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
Hi everyone, I’m trying to deploy a very trivial dashboard and I always get this error.
The imports are:
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import streamlit as st
and the requirements.txt that I tried where:
and this with the corresponding version numbers
Where’s my mistake?
Thank you in advance
Welcome to the community.
Please share a link to your public github repo.
The repo is extra-project-on-t-test
The link brings to the app script
The error results from a combination of having spaces in the directory name and using the incorrect syntax in your requirements file.
The steps to resolve your issue:
- Rename the Project 5 - States data folder to not have spaces. Something like
Project-5-States-data. Replace the empty spaces with
- Fix the errors in your requirements file. The package is
scipy, not scipy.stats. The package is
matplotlib, not matplotlib.pyplot.
Once you make the above changes, and deploy your app, it should install the requirements:
You will run into other errors unrelated to this thread. Namely, your script tries to load files from non-existent directories. You will have to change those filepaths in your code to
states = pd.read_excel(r"Project-5-States-data/State data.xlsx")
After which you will run into another error about a missing
openpyxl dependency required to read Excel files with Pandas. So you will also have to include
Doing all of the above will finally lead to a successful deploy: