Книга: Automate the Boring Stuff with Python: Practical Programming for Total Beginners
Назад: 18. Controlling the Keyboard and Mouse with GUI Automation
Дальше: B. Running Programs

, the website of the Python Software Foundation. PyPI, or the Python Package Index, is a sort of free app store for Python modules.

The pip tool is meant to be run from the command line: You pass it the command install followed by the name of the module you want to install. For example, on Windows you would enter pip install ModuleName, where ModuleName is the name of the module. On OS X and Linux, you’ll have to run pip3 with the sudo prefix to grant administrative privileges to install the module. You would need to type sudo pip3 install ModuleName.

If you already have the module installed but would like to upgrade it to the latest version available on PyPI, run pip install –U ModuleName (or pip3 install –U ModuleName on OS X and Linux).

After installing the module, you can test that it installed successfully by running import ModuleName in the interactive shell. If no error messages are displayed, you can assume the module was installed successfully.

You can install all of the modules covered in this book by running the commands listed next. (Remember to replace pip with pip3 if you’re on OS X or Linux.)

© RuTLib.com 2015-2018