The circup install
command is used to install the specified libraries onto the connected device.
$ circup install --help Usage: circup install [OPTIONS] [MODULES]... Install a named module(s) onto the device. Multiple modules can be installed at once by providing more than one module name, each separated by a space. Modules can be from a Bundle or local filepaths. Options: --py Install the .py version of the module(s) instead of the mpy version. -r, --requirement FILE specify a text file to install all modules listed in the text file. Typically requirements.txt. -a, --auto Install the modules imported in code.py. -U, --upgrade Upgrade modules that are already installed. --auto-file TEXT Specify the name of a file on the board to read for auto install. Also accepts an absolute path or a local ./ path. --help Show this message and exit.
Options Details
There are several options specific to the install
command that can be used to control it's behavior.
-
--help
: Print the built-in documentation of the install command (shown above). -
--py
: Load the .py version of the module(s) instead of the .mpy ones. This is helpful if you want to be able to look at the clear text python code for the library for troubleshooting or development purposes. Or if you are testing an awkward core version that has restricted support for mpy versions. -
-r [file]
,--requirement [file]
: Instead of listing module(s) on the command line read them from a text file, typically requirements.txt. The requirements listed in this file can be pypi names likeadafruit-circuitpython-display-text
or "import names" likeÂadafruit_display_text
. -
-a
,--auto
: Automatically look for dependencies inside of code.py or the specified auto-file instead of passing module(s) by command line. It will find any libraries imported within the file then install them. -
-u
,--upgrade
: Force the newly installed library to overwrite the previously installed instance. By default circup will print an error and not overwrite libraries that are already installed. This flag indicates the user wishes to overwrite any existing library versions that are found. The existing libraries are deleted, so be careful if you're modifying your libraries, make sure you backup any important versions! -
--auto-file [file]
: Specify the file to use with-a
,--auto
. If it is not specified thencode.py
is used by default.
Modules Arguments
The final part of the command is a single or space separated list of multiple modules to install. The module names should be the same ones used to import them in code e.g. adafruit_display_text
.
Tab Completion
The modules argument supports tab completion while you're entering the modules into terminal. So if you type circup install ad
then press the Tab key, it will autocomplete the rest of the word "adafruit_". If you press the Tab key again it will offer to show you all of the possible module names.
Tab Completion may not work on some systems such as the Raspberry Pi
$ circup install adafruit_[Tab] Display all 329 possibilities? (y or n)
If you press the y key it will output a list of module names that match the partial entry currently at the end of the command. Depending on the length of the partial module that is currently entered it could be a rather long list. As you get more of the partial module name entered it will narrow down the list of valid module names.Â
$ circup install adafruit_display[Tab] adafruit_display_notification adafruit_displayio_sh1106 adafruit_display_shapes adafruit_displayio_sh1107 adafruit_display_text adafruit_displayio_ssd1305 adafruit_displayio_flipclock adafruit_displayio_ssd1306 adafruit_displayio_layout
If there is only a single possible valid module name it will autocomplete the full name.
$ circup install adafruit_lo[Tab] $ circup install adafruit_logging
$ circup install adafruit_rsa $ circup install adafruit_display_shapes adafruit_display_text $ circup install adafruit_logging --py --upgrade $ circup --path cool_project/ --cpy-version 9.0.0 install adafruit_logging $ circup --host 192.168.1.188 --password Passw0rd install adafruit_display_text $ circup --host 192.168.1.188 --password Passw0rd install --auto
$ circup install adafruit_rsa Found device at /media/myusername/CIRCUITPY, running CircuitPython 8.2.9. A newer version of CircuitPython (9.0.5) is available. Get it here: https://circuitpython.org/board/adafruit_feather_esp32s3_tft Downloading latest bundles for adafruit/Adafruit_CircuitPython_Bundle (20240525). py: Extracting: [####################################] 100% 8.x-mpy: Extracting: [####################################] 100% 9.x-mpy: Extracting: [####################################] 100% OK Downloading latest bundles for adafruit/CircuitPython_Community_Bundle (20240524). py: Extracting: [####################################] 100% 8.x-mpy: Extracting: [####################################] 100% 9.x-mpy: Extracting: [####################################] 100% OK Searching for dependencies for: ['adafruit_rsa'] Ready to install: ['adafruit_hashlib', 'adafruit_logging', 'adafruit_rsa'] 'adafruit_hashlib' is already installed. 'adafruit_logging' is already installed. Installed 'adafruit_rsa'.
circup --host 192.168.1.111 --password Passw0rd install adafruit_display_text Found device at http://:[email protected], running CircuitPython 9.0.5. Searching for dependencies for: ['adafruit_display_text'] Ready to install: ['adafruit_bitmap_font', 'adafruit_display_text'] 'adafruit_bitmap_font' is already installed. Installed 'adafruit_display_text'.
Page last edited January 29, 2025
Text editor powered by tinymce.