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 allows you to 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 the package manager by selecting Python Packages in the sidebar or bottom tab bar on the app’s Home screen — or from the workspace of the document you are working on, using the top toolbar.
The package manager interface consists of two major components: packages list and package details. When opened on an iPad in fullscreen, the packages list is displayed on the left, and details of the selected package are displayed on the right.
The packages list displays all installed packages, allowing you to 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. The package manager will not allow you to delete or upgrade those, as Juno may rely on a particular version of a pinned package internally.
You can use the 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 further filter results 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 the 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 you know what exactly is missing.
You can also delete user-managed packages from the list: a left swipe on the package will reveal a Delete option.
The package details screen itself consists of several sub-components: package status message, release selector, list of requirements, and project info.
###
Status message
The 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, the 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 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 iOS by analysing package metadata and displays a compatibility message next to the release version.
For packages with dependencies, the 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.
The 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 the case of installed packages, you can also view the license text and top-level modules — these are package names that you will use in your code 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 note that not all packages are compatible, and some may fail to install due to iOS platform restrictions.
Alternatively, you can manually place package sources into the /site-packages
directory in Juno’s on-device storage. You should be able to import the package in your code, although if the sources come 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.