• How to use Google-OR-Tools with Python ( Beginner Tutorial)

                                        

    Install Python 


    Download python here https://www.python.org/downloads/





    After downloading find the application to install






    Click on the application and install. Please tick the checkbox of "Add Python 3.10 to PATH".




    Next open cmd or PowerShell then run $ python --version to make sure it has already been installed






    Install Google-OR-Tools


    Install the Google-OR-Tools as shown at their website at https://developers.google.com/optimization/install.

    By using the Powershell run command $ python -m pip install --upgrade --user ortools







    Google-OR-Tools installation complete 


    Running Python program 


    Then after installing the OR-Tools we can start the code. Furthermore, Google has given a sample script at https://developers.google.com/optimization/introduction/python that we can try.





    Use any IDE that you like, for example, I use Sublime. Create a new file paste the script and save it as "program.py"





    Next, find the file directory and open the File Explorer. Then by using the Shift + Right Click on Mouse inside the folder.

    You will be able to open the PowerShell at the folder directory/location. Choose the "Open PowerShell window here" option.








    Finally, run the script by using $ python program.py on the PowerShell.





















  • 0 comments:

    Post a Comment

    GET A FREE QUOTE NOW

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

    ADDRESS

    4759, NY 10011 Abia Martin Drive, Huston

    EMAIL

    contact-support@mail.com
    another@mail.com

    TELEPHONE

    +201 478 9800
    +501 478 9800

    MOBILE

    0177 7536213 44,
    017 775362 13