Question: So, I want to write the output of a function over an image. But what I'm getting is the text goes under the image:

[![](https://i.stack.imgur.com/3ulso.png)](http://prntscr.com/6tepu4 "Link to original image location, 'prntscr.com'.")

I wanted that number over the image, under the word "Saldo".

```js
var saldo = 10;
var tempo=setInterval(function(){debita()}, 1000);

function debita(){

 if (saldo > 0){
  saldo = saldo - 0.0014;
  document.getElementById("Saldo").innerHTML = saldo;
 }
} 
```

```html
<!DOCTYPE html>
<html>
<head>
 <link rel="stylesheet" type="text/css" href="style.css">
 <script src="functions.js"></script>
</head>
<body>

 <div style="position: relative;">
  <img  src="Screen 1.jpg" usemap="#Map" />
  <map name="Map" id="Map">
   <area href="continuar.html" shape="poly" coords="54,57,15,92,89,92" />
  </map>
  <div style="position: absolute;"><p id="Saldo"></p></div>
 </div>

</body>
</html>
```

Answer: 
I would indeed advice to always use virtualenv for requirements specific to a certain application. Tools you use as a developer for multiple projects (something like `ipdb`) are fine to install globally on the system.

Note that all pip packages are open source, so you have some assurance that famous pip packages are likely not to have malicious code, but could contain security leaks of course.

To prevent accidentally installing a pip package outside a virtualenv, you can add this to your `.bashrc`:

```
export PIP_REQUIRE_VIRTUALENV=true

```

When you then run `pip install something` outside a virtualenv, it will show an error message:

```
Could not find an activated virtualenv (required).

```

If you still want to be able to install pip packages outside a virtualenv, you can add a function in your `.bashrc` like this:

```
syspip() {
    PIP_REQUIRE_VIRTUALENV="" pip "$@"
}

```

Then you can run `syspip install something` to install something globally on your system.

As for the script you are running:

```
import sys 
print(sys.path)

```

It doesn't matter if you run that with sudo or not, sudo only changes the user privileges you are executing the command with, for this script it doesn't matter.
Running `sudo pip install <package>` will install the package to the system wide set of packages, typically stored somewhere like `/usr/lib/python2.7/site-packages`.

Running `pip install package` without a virtualenv activated will attempt to install the package to the same place, but because (if your system is configured sanely/correctly) you won't have write access to that folder, the install command will fail.

It's generally better to use distribution packages if you can for global installs if you absolutely have to install globally, as then you get the benefit of automatic updates. As you've worked out however, it's far better to not install packages globally at all, and use virtualenvs