-
Notifications
You must be signed in to change notification settings - Fork 53
Installing from github or local checkout (non root installation)
This page describes how you can install udiskie into a virtual environment (no root permissions required). This is useful to quickly test new development branches or the most recent master commit without having to install udiskie on the system level. This article is mainly targeted at users of archlinux but may be useful for others as well.
Note that if you want to install a regular release, there is an official archlinux package that can be installed using pacman:
sudo pacman -S udiskie
To install udiskie manually on archlinux follow the instructions on the remainder of this page. These instructions may also be useful for package maintainers.
Install the following dependencies:
sudo pacman -S udisks2 python-gobject python-setuptools python-docopt
sudo pacman -S gtk3 libnotify gettext python-keyutils keyutils python-yaml
sudo pacman -S xfce4-notifyd
(Only the first line is strictly required, depending on the level of features you are going to use.)
Remove any pre-existing udiskie installations:
sudo pacman -R udiskie # remove system package
sudo pip uninstall udiskie # remove root installation
pip uninstall udiskie # remove non-root installation
Depending on your needs, choose one of the following options:
-
Install the latest stable release
pip install --user udiskie
-
If you have pipx, this is better:
pipx install udiskie
-
Install the most recent commit from a github branch (here
master
):pip install --user git+git://github.com/coldfix/udiskie@master
-
Install from a local checkout
git clone git://github.com/coldfix/udiskie -b master cd udiskie # Load udiskie directly from the current directory every time, i.e. any changes # you make to the code will be visible immediately without re-installing: python setup.py develop --user # OR: install current snapshot: python setup.py install --user
Note that the --user
performs a non-root installation into the ~/.local/
prefix. To
make use of this installation, you have to add ~/.local/bin
to your $PATH
. I recommend
to add this line to your ~/.bashrc
:
export PATH=$HOME/.local/bin:$PATH
You can of course alternatively drop the --user
option and install udiskie in a
virtualenv instead or even on system level
using sudo
. For example:
sudo pacman -R udiskie
sudo pacman -S python-virtualenv
virtualenv --system-site-packages ENV
source ENV/bin/activate
git clone https://github.com/coldfix/udiskie
cd udiskie
python setup.py develop
udiskie -v