# Enter a Python or Node.js virtual environment
Source: https://docs.webgee.com/en/development/how-to-enter-the-virtual-environment-with-python-ruby-nodejs-selectors



Work on the command line inside an application's virtual environment. Applies to
Python, Ruby and Node.js applications created with the cPanel Selectors.

## Why it matters [#why-it-matters]

Each application gets its own environment with its own interpreter and its own
packages. A plain SSH session uses the **system** interpreter instead.

<Callout type="warn">
  Running `npm install`, `pip install` or `gem install` from a plain SSH session
  installs against the wrong interpreter, into the wrong location. The command
  succeeds, and the application still reports the module as missing.

  This is the usual cause of "I installed it and it still says it cannot find
  it".
</Callout>

## Get the command [#get-the-command]

cPanel gives you the exact command:

1. Open **Setup Node.js App**, **Setup Python App** or **Setup Ruby App**.
2. Find your application.
3. Copy the command shown at the top of its page — labelled **Enter to the
   virtual environment**.

It looks like:

```bash
source /home/cpaneluser/nodevenv/nodeapp/18/bin/activate && cd /home/cpaneluser/nodeapp
```

The path contains the interpreter version and the application root, so it
differs per application. Use the one cPanel shows rather than adapting an
example.

## Use it [#use-it]

Connect over SSH — see [Connect over SSH](/en/development/connect-via-ssh) — and
paste the command.

Your prompt changes to show the environment is active. Now `npm`, `pip` or `gem`
target the right interpreter:

```bash
npm install express
pip install requests
```

Leave with `deactivate`.

## After installing [#after-installing]

Restart the application from its cPanel page. A running Node.js or Python
application does not pick up new packages until it restarts.

## If the command fails [#if-the-command-fails]

* **`No such file or directory`** — the application was removed or recreated,
  and the path changed. Copy the current one from cPanel.
* **The prompt does not change** — the `source` did not run. Use `source`, not
  `sh`, and do not run it in a subshell.
* **Still the wrong version** — check with `which node` or `which python`. It
  should point inside your home directory, not `/usr/bin`.

## Related [#related]

* [Set up a Node.js application](/en/development/how-to-setup-a-nodejs-application-on-cpanel)
* [Connect over SSH](/en/development/connect-via-ssh)
