python -V
in terminal$ python -V
## Python 3.12.0
# 新建目录
$ mkdir <project>
$ cd <project>
# init git
<p>$ git init
# gitignore
## windows powershell
<p>$ powershell Start-BitsTransfer -Source https://www.toptal.com/developers/gitignore/api/python -Destination .gitignore
## linux
<p>$ wget https://www.toptal.com/developers/gitignore/api/python -O .gitignore
<p>$ curl https://www.toptal.com/developers/gitignore/api/python -o .gitignore
# 创建虚拟环境
<p>$ python -m venv <venvName>
# 激活虚拟环境
## linux
<p>$ source <venvName>/bin/activate
## windows
<p>$ <venvName>\Scripts\activate
## 安装依赖
<venvName>$ pip install numpy
## 保存依赖
<venvName>$ pip freeze > requirements.txt
## coding
<venvName>$ touch main.py
## run
<venvName>$ python main.py
refs:
$ git clone <github:project>
$ cd project
# 创建虚拟环境
<p>$ python -m venv <venvName>
# 激活虚拟环境(上面)
# 根据依赖文件安装依赖
<venvName>$ pip install -r requirements.txt
pip -V
python -m pip install --upgrade pip
pip list
pip freeze
pip freeze > requirements.txt
pip install
pip uninstall
pip install -r requirements.txt
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.