9

I do most of my work (involves a lot of C/Python) on a development server that is shared with several other people. As a result we all seem to do a bit of the system administration chores (there is no sysadmin). This tends to work alright, but installing and maintaining packages and libraries tends to be messy.

Lately I've found myself installing and building more and more packages etc in my home directory. What is the best way to formalize/streamline this process? Right now I am merely ./configuring with --prefix, setting my path so that my ~/usr/bin comes before usr/bin, etc, and trying to set LD_LIBRARY_PATH and C_INCLUDE_PATH and `PYTHONPATH properly, but this is becoming error-prone and painful. Is there a more "automated" method?

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233

3 Answers3

4

For simple package management, you can use stow. Install each package in a separate directory (e.g. ~/packages/stow) and stow automatically maintains a combined hierarchy of symbolic links (e.g. ~/packages/bin/pydoc -> ~/packages/stow/python/bin/pydoc).

Also consider xstow, a more powerful program around the same basic principle.

0

I see this is an old question, but someone who ends up here might find it useful to be pointed in the direction of current package management for python - Poetry assists both with package management and (virtual)environment management for Python: https://python-poetry.org/docs/managing-environments/

New projects can be created simply with:

poetry new myproject

A new virtualenv is created and can be activated with:

poetry shell

Dependencies can be added with:

poetry add pendulum

And you can specify a Python version for the current project:

poetry env use python3.7

HTH

0

Are you able to use a package manager, such as pacman (arch linux), emerge (gentoo), apt-get (Debian-based - such as Ubuntu), yum (RHEL)?

IF these are custom installs that require specific version, then you should be installing them system-wide in /usr/bin and running them as specific user (non privileged).

drewrockshard
  • 221
  • 1
  • 3