python modules install methods
- apt (yum)
- easy_install
- pip
apt
This works fine most of the time, just look if the package you need is available, like : "python-yourpackage" in aptitude and install.
pip
Probably means Python Install Package ? Anyway it says that this is a replacement for easy_install (see next). So it can probably install eggs as well, i have none to try at the moment. Basic usage :
| pip | |
|---|---|
It will download and install automatically, sudo will be needed to write in the python installation directories. Other useful options are listing the installed packages :
| list packages | |
|---|---|
And searching for packages :
| search packages | |
|---|---|
Gives a list like this :
So it searches where autobahn appears in the name or description.
eggs
Maybe easy_install can do lots more, but this is the only time i needed it and that was to install the autobahn egg.
Eggs are to pythons what jars are to java. You can install an .egg with the easy_install module that is part of setuptools which most likely is already installed on your system.An example :
| easy_install | |
|---|---|
Should do the trick.
npm
Node package manager.
Npm comes with python, and you can use it to install packages. If you get any permission errors when installing globally (with -g) install node and npm with nvm see next:
nvm
See nvm_link
Node version manager. Using this to install node and npm will make sure the packages go into a writable and reachable directory. First install nvm, then open a new shell and reinstall node and npm:
Now issue the npm -g command from before, it will succeed.