Win10 安裝 NBA

下載檔案

https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe
https://sourceforge.net/projects/openssl-for-windows/files/latest/download
https://www.sqlite.org/snapshot/sqlite-tools-win-x64-202311231212.zip
https://www.sqlite.org/2023/sqlite-dll-win-x64-3440100.zip
https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/Git-2.43.0-64-bit.exe

安裝 sqlite3

解壓 sqlite-tools-win-x64-202311231212.zip 及 sqlite-dll-win-x64-3440100.zip

將解壓的檔案複製到 C:\Program Files\sqlite 中

安裝 openssl 1.1.1q

解壓 OpenSSL-1.1.1q_win32

將解壓的檔案複製到 C:\Program Files\OpenSSL-1.1.1q_win32

配置環境變數

在系統環境變數裡的 Path 裡 新增

C:\Program Files\sqlite

C:\Program Files\OpenSSL-1.1.1q_win32

C:\Users\使用者\AppData\Roaming\Python\Python310\Scripts

安裝 Python 3.10.0

執行 python-3.10.0-amd64.exe

記得將 Add python.exe to PATH 打勾

選 Customize Installation -> 下一步

將 Install Python 3.10.0 for all user 打勾 -> 安裝

點 Disable path length limit

安裝完成後,開 終端機

pip install --upgrade pip
python
import ssl
ssl.OPENSSL_VERSION

安裝 Git

執行 Git-2.43.0-64-bit.exe -> next -> next

將 (NEW!) Add a Git Bash Profile to Windows Terminal 打勾 -> 一路 next -> Install

下載 NBA

在桌面建立一個 NBA 資料夾

執行 Git GUI

Repository -> Clone

Source Location: https://github.com/kyleskom/NBA-Machine-Learning-Sports-Betting.git

Target Directory: C:\Users\使用者\Desktop\NBA\NBA-Machine-Learning-Sports-Betting

clone

建 NBA 環境

在 終端機 內

cd C:\Users\使用者\Desktop\NBA\NBA-Machine-Learning-Sports-Betting

修改 requirements.txt 文件, 如下:

colorama
pandas==2.1.0
sbrscrape
tensorflow==2.11.0
#tensorflow-metal==1.1.0
xgboost
tqdm
flask
scikit-learn

修改完存檔

pip install -r requirements.txt

取完整資料

cd src/Process-Data
python -m Get_Data
python -m Get_Odds_Data
python -m Create_Games

訓練模型

cd ..\Train-Models
python -m XGBoost_Model_ML
python -m XGBoost_Model_UO

測試(下載完新資料,訓練完模型,就不會有錯誤訊息)

python main.py -xgb -odds=fanduel

包含 fanduel, draftkings, betmgm, pointsbet, caesars, wynn, bet_rivers_ny

開啟 web 連線

cd C:\Users\使用者\Desktop\NBA\NBA-Machine-Learning-Sports-Betting
flask --debug run --host=0.0.0.0
Previous Article
Next Article

發佈留言

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>