Python Forum
not able to solve installation of peewee and yfinance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
not able to solve installation of peewee and yfinance
#1
Sad 
Ls,

Was chatting with chatGpt (yes, that lonely) about using the yfinance module(Yahoo). But I seem not to be able to install the required stuff.
Apologies in advance if this is in the wrong place in the forum altogether.
FYI: I am a NOOB. Not at programming per se but this seems to elude me.
So...
Using Windows11 (sorry gave in at the end).
I want to use the yfinance module.
Downloaded all the C++ build tools (for sqllite3)
Dropped down to python 3.8 for.. Winsock I think to remember.
Removed ALL python stuff and registry items.
Reinstalled.
The only thing that seems to no compute at the moment is the correct installation of peewee and the yfinance modules.
I had to manually install most python modules; they say they installed but using "pip list" they tend not to show up.
Now it is complaining about a sqllite .h file and .lib(that I have downloaded and PATH'ed) on building the peewee; python install peewee is very friendly but it doesn't seem to work.

Long story short, thank you for reading this far.
What is the best way to approach this very versioned Python system?
When I go all out on the latest version of Python, I get these "depreciated" warnings.
When I step down I get weird errors.

Even shorter:
I wrote this small script(see below) using the (yahoo) yfinance module to get market data on stocks.
But I seem not to be able to even install the right Python versions/modules.
Any help is greatly appreciated.

from yahoo_fin import stock_info as si
import pandas as pd

# Haal de top stijgers op van Yahoo Finance
def get_top_movers():
    try:
        gainers = si.get_day_gainers()
        return gainers.head(100)  # Beperk tot de top 100
    except Exception as e:
        print(f"Fout bij ophalen gegevens: {e}")
        return None

# Sla de gegevens op in een Excel-bestand
def save_to_excel(dataframe, filename="Top_100_Stijgers.xlsx"):
    try:
        dataframe.to_excel(filename, index=False, engine="openpyxl")
        print(f"Gegevens succesvol opgeslagen in {filename}")
    except Exception as e:
        print(f"Fout bij opslaan van Excel-bestand: {e}")

if __name__ == "__main__":
    # Haal de top stijgers op
    data = get_top_movers()
    if data is not None:
        save_to_excel(data)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create SQLite3 database with peewee Jim53_1980 2 1,942 Dec-20-2023, 02:38 PM
Last Post: buran
  why is yfinance returning an ellipsis in the middle of ticket history db042190 3 1,877 Jun-12-2023, 06:03 PM
Last Post: db042190
Photo can't install yfinance db042190 4 35,805 Jun-12-2023, 01:14 PM
Last Post: db042190
  Yfinance - Intraday stock data with yf.download diogo_80 2 8,560 Apr-29-2022, 05:07 AM
Last Post: processingclouds
Lightbulb Peewee returning objects and not strings.. JerryMotov 2 4,354 Dec-10-2017, 05:56 PM
Last Post: JerryMotov
  peewee.OperationalError: no such table: JerryMotov 3 8,285 Dec-10-2017, 05:45 PM
Last Post: JerryMotov

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020