環境構築用 pyproject.toml
AtCoderにおける2023年の言語アップデート後のCPython環境と(なるべく)同じものを構築するための pyproject.toml
- 事前に Python 3.11.4 と poetry はインストールしておく
- 構築したいディレクトリに pyproject.toml を配置し、同階層で
poetry install
を実行すると、そのディレクトリ下で環境が使えるようになる - 重要なのは、[tool.poetry.dependencies] のセクションのみであり他は適当
- torchはニューラルネットワーク用パッケージだが、インストール時にエラーが出たし、あまり使う展望が見えないため、保留
- pyproject.toml
[tool.poetry] name = "atcoder" version = "0.1.0" description = "" authors = ["Your Name <you@example.com>"] [tool.poetry.dependencies] python = "3.11.4" absl-py = "1.4.0" ac-library-python = { git = "https://github.com/not522/ac-library-python", rev = "58f324ec020d57191e7b9e4957b0c5feb5ed3aff" } bitarray = "2.6.2" cppyy = "2.4.1" cppyy-backend = "1.14.9" cppyy-cling = "6.27.0" CPyCppyy = "1.12.11" gmpy2 = "2.1.5" joblib = "1.3.1" lightgbm = "3.3.1" llvmlite = "0.40.1" more-itertools = "9.0.0" mpmath = "1.2.1" networkx = "3.0" numba = "0.57.0" numpy = "1.24.1" # nvidia-cublas-cu11 = "11.10.3.66" # nvidia-cuda-nvrtc-cu11 = "11.7.99" # nvidia-cuda-runtime-cu11 = "11.7.99" # nvidia-cudnn-cu11 = "8.5.0.96" ortools = "9.5.2237" pandas = "1.5.2" polars = "0.15.15" protobuf = "4.23.4" PuLP = "2.7.0" python-dateutil = "2.8.2" pytz = "2023.3" scikit-learn = "1.2.0" scipy = "1.10.1" shapely = "2.0.0" six = "1.16.0" sortedcontainers = "2.4.0" sympy = "1.11.1" threadpoolctl = "3.2.0" # torch = "1.13.1" typing_extensions = "4.7.1" z3-solver = "4.12.1.0" [tool.poetry.dev-dependencies] [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api"