Skip to content

Installing & Using Python Packages with ELPM

EasyLang supports importing Python modules directly, which makes EasyLang extremely powerful.
ELPM is the tool that installs these packages.

This guide covers:

  • Installing packages
  • Searching for packages
  • Viewing package info
  • Using installed packages inside EasyLang

Installing a Package

elpm --install <package>

Example:

elpm --install pillow

Progress bars indicate:

  • Metadata download
  • File download
  • Installation

This behavior is implemented in ELPM’s install_package() function.


Using the Package in EasyLang

After installation:

bring pillow as p

we let img = p.open("cat.png")
so print img.size

Example with requests:

bring requests as req

we let r = req.get("https://httpbin.org/get")
so print r.status_code


Searching Packages

elpm --search <keyword>

Example:

elpm --search json

Output shows matching PyPI packages.


Viewing Package Info

elpm --info <package>

Example:

elpm --info numpy

Shows version, location, summary, dependencies, etc. This is powered by ELPM’s show_info() wrapper.


Upgrading a Package

elpm --upgrade <package>

Example:

elpm --upgrade flask

Shows progress bars and fetch info messages.


Uninstalling a Package

elpm --uninstall <package>

Example:

elpm --uninstall pillow


Listing Installed Packages

elpm --list

Uses pip JSON output internally.


Freezing Dependencies

elpm --freeze

This outputs pip freeze results — useful for reproducible builds.


Importing Installed Packages in EasyLang

Simply:

bring <package> as alias

Example:

bring numpy as np
so print np.array([1, 2, 3])


Summary

ELPM makes Python package installation simple:

  • Install
  • Upgrade
  • Uninstall
  • Search
  • Info
  • Freeze
  • List

Then import packages directly into EasyLang.


Next page:

Continue to Managing Dependencies