PackageTool - Maple Help

Python

 PackageTool
 parse and evaluate a Python def statement

 Calling Sequence PackageTool[action](package_name)

Parameters

 action - string or name package_name - string

Description

 • The PackageTool command uses Python's PIP package manager to install, uninstall, or provide information about Python packages.
 • Available actions are: install, download, uninstall, freeze, list, show, search, and hash.  Refer to Python PIP documentation for specific details on these actions.
 • This command calls "python -m pip action package_name" with the environment configured to point to the Python installation accompanied with Maple.  To provide extra options, modify the package_name string to include those options.
 • The return value is a 2 element list as per ssystem. The first element is the return code of calling the python command, with 0 indicating success and any other value indicates failure. The second element is the output of the command as a Maple string.
 • Linux users should note that these commands require at least OpenSSL 1.0.2.  OpenSSL is an external package and is up to the user to add to their own operating system.  To query the version of SSL you are using, run "openssl version" at a Linux command prompt.
 • This function is part of the Python package, so it can be used in the short form PackageTool(..) only after executing the command with(Python). However, it can always be accessed through the long form of the command by using Python[PackageTool](..).

Examples

 > $\mathrm{with}\left(\mathrm{Python}\right):$
 > $\mathrm{PackageTool}:-\mathrm{list}\left(\right)$
 > $\mathrm{PackageTool}:-\mathrm{show}\left("tensorflow"\right)$
 > $\mathrm{PackageTool}:-\mathrm{search}\left("peppercorn"\right)$
 > $\mathrm{PackageTool}:-\mathrm{install}\left("nltk"\right)$

Compatibility

 • The Python[PackageTool] command was introduced in Maple 2018.