### Example requirements file content Source: https://ekalinin.github.io/nodeenv A plain text file listing Node.js packages and their specific versions, used for creating repeatable installations. ```text connect@1.3.0 express@2.2.2 jade@0.10.4 mime@1.2.1 npm@0.3.17 qs@0.0.7 ``` -------------------------------- ### Install nodeenv Globally with easy_install Source: https://ekalinin.github.io/nodeenv Installs nodeenv globally using easy_install. Requires sudo privileges. ```bash $ sudo easy_install nodeenv ``` -------------------------------- ### Install nodeenv from GitHub Source: https://ekalinin.github.io/nodeenv Installs the latest version of nodeenv by cloning the GitHub repository and running the script directly. Useful for development or using the most recent features. ```bash $ git clone https://github.com/ekalinin/nodeenv.git $ ./nodeenv/nodeenv.py --help ``` -------------------------------- ### Create environment copy from requirements file Source: https://ekalinin.github.io/nodeenv Builds a new Node.js environment ('env-copy') by installing packages listed in the specified requirements file ('../prod-requirements.txt'). Supports parallel installation using the --jobs flag. ```bash $ nodeenv --requirement=../prod-requirements.txt --jobs=4 env-copy ``` -------------------------------- ### Save installed packages to requirements file Source: https://ekalinin.github.io/nodeenv After activating a Node.js environment and installing global packages (e.g., express, jade), this command saves the list of installed packages and their versions to a specified file. ```bash (env) $ npm install -g express (env) $ npm install -g jade (env) $ freeze ../prod-requirements.txt ``` -------------------------------- ### Check Node.js and npm versions Source: https://ekalinin.github.io/nodeenv Verifies the versions of Node.js and npm installed within the activated environment. This is useful for confirming the environment is set up correctly. ```bash (env) $ node -v v0.4.6 (env) $ npm -v 0.3.18 ``` -------------------------------- ### Install nodeenv Locally within a virtualenv Source: https://ekalinin.github.io/nodeenv Installs nodeenv inside an existing Python virtual environment. First, create and activate a virtual environment, then install nodeenv using pip. ```bash $ virtualenv env $ . env/bin/activate (env) $ pip install nodeenv (env) $ nodeenv --version 0.6.5 ``` -------------------------------- ### Install nodeenv Globally with pip Source: https://ekalinin.github.io/nodeenv Installs nodeenv globally using pip. Requires sudo privileges. ```bash $ sudo pip install nodeenv ``` -------------------------------- ### Install Node.js module globally within a Python virtualenv Source: https://ekalinin.github.io/nodeenv Installs a Node.js package globally within the integrated Python virtual environment. The 'which' command verifies that the executable is installed in the virtual environment's bin directory. ```bash $ workon my_env (my_env) $ npm install -g coffee-script (my_env) $ which coffee /home/User/virtualenvs/my_env/bin/coffee ``` -------------------------------- ### Run nodeenv from a downloaded script Source: https://ekalinin.github.io/nodeenv Executes nodeenv using a downloaded raw Python script. This method avoids global installation and is useful for quick testing or specific environments. ```bash $ wget https://raw.github.com/ekalinin/nodeenv/master/nodeenv.py $ python nodeenv.py --version 0.6.5 ``` -------------------------------- ### Integrate nodeenv with Python virtualenv (wrapper) Source: https://ekalinin.github.io/nodeenv Demonstrates how to create and activate a Python virtual environment using virtualenvwrapper, preparing it for integration with nodeenv. ```bash # in case of using virtualenv_wrapper $ mkvirtualenv my_env ``` -------------------------------- ### Integrate nodeenv with Python virtualenv (manual) Source: https://ekalinin.github.io/nodeenv Shows the manual activation of a Python virtual environment using virtualenv, setting the stage for nodeenv integration. ```bash # in cace of using virtualenv $ . my_env/bin/activate ``` -------------------------------- ### Create a new Node.js environment Source: https://ekalinin.github.io/nodeenv Initializes a new isolated Node.js environment named 'env'. This command sets up the directory structure and necessary files for the isolated environment. ```bash $ nodeenv env ``` -------------------------------- ### Activate a Node.js environment Source: https://ekalinin.github.io/nodeenv Activates the previously created Node.js environment. This modifies your shell's PATH to prioritize the executables within the 'env' directory. ```bash $ . env/bin/activate ``` -------------------------------- ### Add Node.js environment to existing Python virtualenv Source: https://ekalinin.github.io/nodeenv Adds a Node.js virtual environment to an already activated Python virtual environment ('my_env'). The '-p' flag indicates integration with the existing Python environment. ```bash (my_env) $ nodeenv -p ``` -------------------------------- ### Deactivate the Node.js environment Source: https://ekalinin.github.io/nodeenv Exits the current Node.js environment, restoring your shell's default PATH and environment variables. ```bash (env) $ deactivate_node ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.