Juno ships with many powerful libraries already pre-installed, such as SciPy, Scikit-learn, Pandas and others — but you can also install additional pure-Python packages with Juno’s package manager. It lets you look up packages on PyPI (Python Package Index), install packages that are supported by the platform, check their dependencies and manage the packages you have installed locally.
Status message
Release selector
Requirements
Project info
You can access package manager from the app settings, or from the editor while editing a notebook: tap notebook name in the top bar and select Package Manager in the popup menu.
Package manager interface consists of two major components: packages list and package details. When opened on an iPad in fullscreen, packages list is displayed on the left, and details of the selected package are displayed on the right.
Packages list displays all installed packages, letting you filter by package name and/or installation type — that is, whether the package is pinned or user-managed (i.e. can be upgraded or deleted).
Some of the pre-installed packages are pinned to specific versions. Package manager will not let you delete or upgrade those, as Juno may rely on a particular version of a pinned package internally.
You can use segmented control at the top of the list to filter and display all packages (All), only pinned packages (Pinned), or only packages managed by the user (User). The search field at the top will filter results even further by matching the search query to the packages’ names.
This search field also lets you search for and install new packages. Type the package name in the search bar (the name you would otherwise use with the pip
command) and tap Search for package distributions for Juno to fetch and display package details from PyPI. You can then select package version and tap Install to install it — although keep in mind that only pure Python packages can be installed due to platform restrictions. Package dependencies will not be installed automatically either, although Juno’s package manager will display the list of dependencies, so that you know what exactly is missing.
You can delete user-managed packages from the list, too: left swipe on the package will reveal a Delete option.
Package details screen itself consists of several sub-components: package status message, release selector, list of requirements and project info.
Package status is displayed at the top of the package details: for example, which version is installed at the moment, and whether the package is pinned to a particular version. User-managed packages will also have a Delete button in the status message area.
If the package is not pinned, package manager will display a release selector under the status message area. It lets you select a particular package version and attempt to install it. Attempt is the key word here, as not every package can be installed in Juno due to platform restrictions in the iOS. Furthermore, it is rather hard (if not impossible) to tell if a package can be installed without actually trying to install it. That said, Juno’s package manager tries to infer each version’s compatibility with the iOS by analysing package metadata, and displays a compatibility message next to the release version.
For packages with dependencies, package manager will also display a list of package requirements, i.e. other packages it depends on. Juno analyses available package metadata, checks package dependencies against the app’s current environment and displays a requirement fulfillment message for each dependency. This message will warn you if a particular dependency is missing, or if an incompatible version is installed. Selecting a package in the list of requirements will take you to the dependency package details screen, where you can try installing a different version, for example.
Juno’s package manager does not install package dependencies automatically (yet) — although this is something we are working on. For now, you will need to install dependencies manually one by one.
Package manager will display general project info for every package, based on the package metadata. Project info includes project links, type of license, package name and description, as well as project authors and maintainers.
In case of installed packages you can also view license text and top-level modules — these are package names that you will use in your notebook or script in the import
statements. For example, to import a class or a function from the Scikit-learn package you will refer to it using its top-level module sklearn
.
To install a new package, follow these steps:
Please, mind that not all packages are compatible, and some may fail to install due to iOS platform restrictions.
Alternatively, you can manually put package sources into the /site-packages
directory in Juno’s on-device storage. You should be able to import the package in your notebooks, although if the sources came without metadata (i.e. .egg-info
or .dist-info
folders or files), it will not be displayed in the list of packages in the package manager.
There are three ways to delete a package:
/site-packages
directory in Juno’s on-device storage.