Global installation
You can install nodeenv globally with easy_install:
$ sudo easy_install nodeenv
or with pip:
$ sudo pip install nodeenv
or on Debian using dpkg:
$ ln -s debian-upstream debian
$ dpkg-buildpackage -uc -us -b
$ sudo dpkg -i $(ls -1rt ../nodeenv_*.deb | tail -n1)
Local installation:
$ virtualenv env
$ . env/bin/activate
(env) $ pip install nodeenv
(env) $ nodeenv --version
If you want to work with the latest version of the nodeenv you can install it from the github repository:
$ git clone https://github.com/ekalinin/nodeenv.git
$ ./nodeenv/nodeenv.py --help
or with pip:
$ pip install -e git+https://github.com/ekalinin/nodeenv.git#egg=nodeenv
Dependency:
For nodeenv
python (2.6+, 3.5+, or pypy)
make
tail
For node.js
libssl-dev
Usage:
Basic
Create new environment:
$ nodeenv env
Activate new environment:
$ . env/bin/activate
Check versions of main packages:
(env) $ node -v
v0.10.26
(env) $ npm -v
1.4.3
Deactivate environment:
(env) $ deactivate_node