Module yfinance throw an error

Hi. I’m trying to deploy my app, but i get an errors.
Error on app: ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Error on console: `Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py”, line 475, in _run_script

exec(code, module.__dict__)

File “/app/stock_test/main.py”, line 3, in

import yfinance as yf

ModuleNotFoundError: No module named ‘yfinance’`
I have a environment.yml with dependecies, includes yfinance module.

Please share a link to your public github repo.

Sure!
https://github.com/EgorPotopeiko/stock_test.git

Did you ever solve your issue?

If not, then you need to include a requirements.txt file with yfinance

I had the same problem until I did that.

Cheers,

Hi! Thanks for feedback!
I’ve already tried adding requirements.txt with same dependecies, but have same errors. I created topic with my problem about a week ago, but I didn’t get a solution.

Upd: Added requirements.txt. WARN: More than one requirements file detected in the repository. Available options: conda /app/stock_test/environment.yml, pip /app/stock_test/requirements.txt. Used: conda with /app/stock_test/environment.yml

Clean up your requirements.txt file, this won’t work, it is crammed with unnecessary packages and windows specific packages.

Okay, I’ve cleared requirements.txt, but anyway, i’ve conflict with requirements.txt and environment.yml together. WARN: More than one requirements file detected in the repository. Available options: conda /app/stock_test/environment.yml, pip /app/stock_test/requirements.txt. Used: conda with /app/stock_test/environment.yml
Main error: import yfinance as yf ModuleNotFoundError: No module named 'yfinance', but requirements.txt and environment.yml have import yfinance

You cannot have both.

App dependencies - Streamlit Docs