Skip to content

Commit

Permalink
BAT file hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
acageduser committed Jul 21, 2024
1 parent 80ee863 commit e7c79be
Show file tree
Hide file tree
Showing 7 changed files with 184 additions and 149 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
cd /d "%~dp0"

:: Check if Python 3.12 is installed
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Checking for Python 3.12 +
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
python --version 2>nul | findstr /r "^Python 3.12" >nul
if %ERRORLEVEL% neq 0 (
echo Python 3.12 not found, please install it manually and ensure it's added to PATH.
pause
exit /b 1
) else (
echo Python 3.12 is already installed.
)

:: Ensure the specific version of pip (24.1.2) is installed
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Installing pip 24.1.2 +
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
python -m ensurepip --upgrade
python -m pip install --upgrade pip==24.1.2

:: Create a virtual environment
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Creating Virtual Environment +
Expand All @@ -28,6 +50,13 @@ echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
call venv\Scripts\activate

:: Install Flask
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Installing Flask +
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
pip install Flask

:: Install the required dependencies
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Installing Required Dependencies +
Expand All @@ -37,17 +66,17 @@ pip install -r requirements.txt

:: Upgrade to a specific version of the OpenAI API
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Upgrading to a Specific Version of OpenAI API +
echo + Upgrading to a Specific Version of OpenAI API +
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
pip install openai==1.35.15

:: Upgrade to a specific version of the OpenAI API
:: Install additional libraries
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo + Install Flask Pillow requests +
echo + Install Pillow and requests +
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
pip install Flask Pillow requests
pip install Pillow requests

:: Run the Flask application
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
278 changes: 139 additions & 139 deletions venv/Scripts/Activate.ps1

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions venv/Scripts/activate
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ deactivate () {
unset _OLD_VIRTUAL_PYTHONHOME
fi

# Call hash to forget past commands. Without forgetting
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi

if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
Expand All @@ -36,7 +39,7 @@ deactivate () {
deactivate nondestructive

# on Windows, a path can contain colons and backslashes and has to be converted:
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then
# transform D:\path\to\venv to /d/path/to/venv on MSYS
# and to /cygdrive/d/path/to/venv on Cygwin
export VIRTUAL_ENV=$(cygpath "C:\Users\acage\Documents\cook-ai\venv")
Expand Down Expand Up @@ -65,6 +68,9 @@ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
export VIRTUAL_ENV_PROMPT
fi

# Call hash to forget past commands. Without forgetting
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
Binary file modified venv/Scripts/python.exe
Binary file not shown.
Binary file modified venv/Scripts/pythonw.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion venv/pyvenv.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
home = C:\Users\acage\AppData\Local\Programs\Python\Python312
include-system-site-packages = false
version = 3.12.4
version = 3.12.0
executable = C:\Users\acage\AppData\Local\Programs\Python\Python312\python.exe
command = C:\Users\acage\AppData\Local\Programs\Python\Python312\python.exe -m venv C:\Users\acage\Documents\cook-ai\venv

0 comments on commit e7c79be

Please sign in to comment.