conda create --yes --name leetcode python=3.10
conda activate leetcode
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
运行以下命令在 leetcode
的 Python 环境中安装 Python 包
poetry install
检查环境是否成功设置
poetry env info
python -m ipykernel install --name leetcode
brew install postgresql
brew services start postgresql
psql -U postgres
CREATE USER leetcode WITH PASSWORD 'leetcode';
ALTER USER leetcode CREATEDB;