Hi,
Could you share the contents of the requirements.txt file?
There is no googletrans==4.0.0
. There may be more issues, since the other packages are quite old. There should be more details in the logs.
But how can I give you a link to the project on GitHub?
Copy the link from the address bar and paste it here.
You are still trying to install googletrans==4.0.0
which does not exist. Why did you put that in your requirements.txt
?
Because it is included in the code
What should I do to solve the problem?
The code doesn’t ask for that specific version. Why did you choose version 4.0.0? It doesn’t exist.
I am a new learner, and at the beginning I heard about the Streamlit library, and it will be useful to me as a data analyst, so I said, “I will start with something simple and try the library with it,” and I created this.
With the first problem, I understood that I had to create a requirements
I used the pipreqs library to create a requirements file for me so that I could use it, and this is what I created.
So the requirements file was made by pipreqs
. Now thngs start making some sense. But not quite, because if I run pipreqs on that code in a fresh environment I get different versions:
googletrans==3.0.0
gtts==2.4.0
streamlit==1.29.0
Did you have those packages already installed in your computer when you ran pipreqs? If the answer is yes, how did you install googletrans
there? Did you ever make the application work locally?
Yes, I ran the program and it worked well as localhost, and I can prove that to you with a video if you want
If I want an easy way to be able to add a valid requirements file
Is there a way?
Well, it depends. In this case, I am not sure. You seem to have googletrans==4.0.0 in your computer, but the latest available version seems to be 3.0.0, which may or may not work for you.
It the application works in your computer, then the first thing that comes to my mind is trying to replicate the local environment in streamlit cloud as much as possible. That is why I asked you how you installed googletrans in your computer.
Well, I copied the requirements file and used it in the code, and now it appears, but another problem occurred, which is when I run the code and translate anything, the problem appears even though this same code works as localhost.
I will post a picture of the problem for you
You are now using a different version of googletrans
that, as I said, may or may not work for you (turns out it doesn’t seem to work). That is why I asked you how you installed googletrans==4.0.0
in your computer.
From the GoogleTrans library installed on my device
These are the versions
googletrans==4.0.0rc1
googletrans-py==4.0.0