(Remember to replace pip with pip3 if you’re on OS X or Linux. You can install all of the modules covered in this book by running the commands listed next. If no error messages are displayed, you can assume the module was installed successfully. You do not need to install or configure anything else to use Python 2. To avoid interfering with macOS, we recommend creating a separate development environment and installing the latest version of Python. 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).Īfter installing the module, you can test that it installed successfully by running import ModuleName in the interactive shell. The latest version of Mac OS X, High Sierra, comes with Python 2.7 out of the box. You would need to type sudo pip3 install ModuleName. On OS X and Linux, you’ll have to run pip3 with the sudo prefix to grant administrative privileges to install the module. For example, on Windows you would enter pip install ModuleName, where ModuleName is the name of the module. 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.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |