Installation¶
getmac supports Python 3.9 and newer, on CPython and PyPy, and has no dependencies.
Stable release from PyPI¶
python3 -m pip install getmac
py -m pip install getmac
This also installs the getmac command (see Command-Line Interface).
Pre-releases from PyPI¶
Alpha, beta, and release candidate versions of getmac are published to PyPI before a stable release. pip skips them unless you ask for them with the --pre flag.
python3 -m pip install --pre getmac
py -m pip install --pre getmac
You can also pin a specific pre-release, for example python3 -m pip install getmac==1.0.0rc1. Pre-releases may have bugs and their behavior may change before the stable release, so please report any issues you run into.
Debian-based Linux distributions¶
apt may have it available, depending on the Linux distribution (see the packaging status below). The packaged version may be older than the one on PyPI.
sudo apt install getmac
OS Packaging Status¶
Docker¶
There’s also a Docker image of the getmac command. See Docker.
Latest development version¶
Warning
Installing directly from main includes pre-release changes and is not recommended for most users.
This will install the latest version from the main branch on GitHub.
python3 -m pip install https://github.com/ghostofgoes/getmac/archive/main.tar.gz
py -m pip install https://github.com/ghostofgoes/getmac/archive/main.tar.gz
Legacy Python versions¶
If you are running an old Python (3.8 and older) or interpreter, then you can install an older version of getmac that supported that version. The wheels are available in the GitHub releases, or from PyPI with a current version of pip and some special arguments.
Python version |
Package to install |
|---|---|
2.5 |
|
2.6 |
|
2.7 |
|
3.2, 3.3 |
|
3.4 to 3.8 |
|
Note
These versions do not have many of the performance improvements, platform support, and bug fixes that came with later releases. They generally work, just not as well.
If you’re moving from 0.9.x to 1.0.0, see Upgrading to 1.0.0.