[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-08-29 UTC。"],[[["\u003cp\u003eThis guide provides instructions for installing and running OR-Tools, a powerful optimization library, specifically on MacOS with Python 3.8+.\u003c/p\u003e\n"],["\u003cp\u003eBefore installing OR-Tools, ensure you have Homebrew and Python 3.8+ installed on your system, following the provided commands for installation and verification.\u003c/p\u003e\n"],["\u003cp\u003eInstall OR-Tools using pip, either for your user or system-wide, and download the example code from the GitHub repository to get started.\u003c/p\u003e\n"],["\u003cp\u003eRun the provided "basic_example.py" file using Python 3 to verify your installation and explore a basic application of OR-Tools.\u003c/p\u003e\n"],["\u003cp\u003eOnce you've completed these steps, you'll be ready to delve deeper into OR-Tools and utilize its capabilities for optimization tasks.\u003c/p\u003e\n"]]],["Install Homebrew via terminal using a provided command, then update it. Ensure Python 3.8+ is installed via Homebrew, updating `pip` as well. Install OR-Tools using `pip` either for the user or system-wide. To uninstall, use `pip uninstall ortools`. Acquire example code by downloading or cloning the repository, then navigate to the `python_or-tools` directory. Finally, run the example using `python3 basic_example.py` from the mentioned directory.\n"],null,["# Using OR-Tools Pip for Python\n\nIntroduction\n------------\n\nThis guide gets you started with OR-Tools in Python with a simple working\nexample.\n\nAlthough these instructions might also work on other MacOS variants, we\nhave only tested them on machines meeting the following requirements:\n\n\n- MacOS 13.0.1 (Ventura) Intel 64-bit (x86_64)\n- MacOS 13.0.1 (Ventura) M1 (arm64)\n\n\u003cbr /\u003e\n\nPrerequisites\n-------------\n\nThe following sections describe the prerequisites for installing OR-Tools.\n\n### Homebrew\n\nTo install the remaining prerequisites, we recommend first installing the\n\"missing package manager for macOS\" otherwise known as\n[Homebrew](https://brew.sh/). To do so, open a terminal window and enter: \n\n /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n brew update\n\nTo verify that you've successfully installed brew: \n\n brew --version\n\nYou should see: \n\n Homebrew 1.6.9-8-g25542d7\n Homebrew/homebrew-core (git revision 0e0c84; last commit 2018-06-20)\n\n### Python\n\nYou must have Python 3.8+ installed.\n\nTo install Python 3.8+, open a terminal window and enter: \n\n brew install python\n python3 -m pip install -U --user wheel six\n\nThen verify your installation: \n\n python3 --version\n python3 -c \"import platform; print(platform.architecture()[0])\"\n python3 -m pip --version\n\nInstalling OR-Tools\n-------------------\n\nAssuming the prerequisite software is installed on your MacOS, take the following steps: \n\n python3 -m pip install -U --user ortools\n\nOr, to install it system wide: \n\n sudo python3 -m pip install -U ortools\n\n### Uninstalling OR-Tools\n\nTo uninstall OR-Tools, issue the following commands: \n\n python3 -m pip uninstall ortools\n\nGet the Python example code\n---------------------------\n\nThe example code is located in the\n[python_or-tools](https://github.com/or-tools/python_or-tools) repository.\n\n1. [Download the repository as a zip file](https://github.com/or-tools/python_or-tools/archive/v9.12.zip)\n and extract it, or clone the repository:\n\n git clone -b v9.12 --depth 1 https://github.com/or-tools/python_or-tools\n\n2. Change to the examples directory:\n\n cd python_or-tools\n\nRun the example\n---------------\n\nFrom the `python_or-tools` directory:\n\nRun the binary using:\n\n\n python3 basic_example.py\n\n\u003cbr /\u003e\n\nCongratulations! You've just run an application with OR-Tools, you are ready to\n[get started with OR-Tools](../../introduction/python)."]]