Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amazon_reports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
amazon_reports
Commits
fbef146a
Commit
fbef146a
authored
Oct 26, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
dbccc7b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
初始化.bat
初始化.bat
+3
-6
No files found.
初始化.bat
View file @
fbef146a
@echo off
@echo off
setlocal
setlocal
:: 设置 Python 下载链接和目标安装目录
set "PYTHON_VERSION=3.10.10"
set "PYTHON_VERSION=3.10.10"
set "PYTHON_INSTALLER=python-%PYTHON_VERSION%-amd64.exe"
set "PYTHON_INSTALLER=python-%PYTHON_VERSION%-amd64.exe"
set "TARGET_DIR=D:\app\Python"
set "TARGET_DIR=D:\app\Python"
:: 下载 Python 安装程序
echo Downloading Python %PYTHON_VERSION%...
echo Downloading Python %PYTHON_VERSION%...
powershell -Command "Invoke-WebRequest -Uri https://www.python.org/ftp/python/%PYTHON_VERSION%/%PYTHON_INSTALLER% -OutFile %PYTHON_INSTALLER%"
powershell -Command "Invoke-WebRequest -Uri https://www.python.org/ftp/python/%PYTHON_VERSION%/%PYTHON_INSTALLER% -OutFile %PYTHON_INSTALLER%"
:: 静默安装 Python
echo Installing Python...
echo Installing Python...
start /wait %PYTHON_INSTALLER% /quiet InstallAllUsers=1 PrependPath=1 TargetDir="%TARGET_DIR%"
start /wait %PYTHON_INSTALLER% /quiet InstallAllUsers=1 PrependPath=1 TargetDir="%TARGET_DIR%"
:: 清理下载的安装程序
echo Cleaning up...
echo Cleaning up...
del %PYTHON_INSTALLER%
del %PYTHON_INSTALLER%
echo Python %PYTHON_VERSION% has been installed to %TARGET_DIR%.
echo Python %PYTHON_VERSION% has been installed to %TARGET_DIR%.
:: 检查 Python 版本
"%TARGET_DIR%\python.exe" --version
"%TARGET_DIR%\python.exe" --version
echo Installing required packages...
echo Installing required packages...
::
"%TARGET_DIR%\pip.exe" install --no-warn-script-location -i https://mirrors.cloud.tencent.com/pypi/simple -r requirements.txt
"%TARGET_DIR%\pip.exe" install --no-warn-script-location -i https://mirrors.cloud.tencent.com/pypi/simple -r requirements.txt
endlocal
endlocal
pause
pause
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment