**System for installing libraries directly into project's directory.**
**System for installing libraries directly into project's directory.**
```bash
```bash
$ python3 -m venv <name> # Creates virtual environment in current directory.
$ python3 -m venv NAME # Creates virtual environment in current directory.
$ source <name>/bin/activate # Activates venv. On Windows run `<name>\Scripts\activate`.
$ source NAME/bin/activate # Activates env. On Windows run `NAME\Scripts\activate`.
$ pip3 install <library> # Installs the library into active environment.
$ pip3 install LIBRARY # Installs the library into active environment.
$ python3 <path> # Runs the script in active environment. Also `./<path>`.
$ python3 FILE # Runs the script in active environment. Also `./FILE`.
$ deactivate # Deactivates the active virtual environment.
$ deactivate # Deactivates the active virtual environment.
```
```
### Basic Script Template
### Basic Script Template
**Run the script with `'$ python3 FILE'` or `'$ chmod u+x FILE; ./FILE'`. To automatically start the debugger when uncaught exception occurs run `'$ python3 -m pdb -cc FILE'`.**
<div><h3id="virtualenvironments">Virtual Environments</h3><p><strong>System for installing libraries directly into project's directory.</strong></p><pre><codeclass="bash language-bash hljs">$ python3 -m venv NAME <spanclass="hljs-comment"># Creates virtual environment in current directory.</span>
</code></pre>
$ <spanclass="hljs-built_in">source</span> NAME/bin/activate <spanclass="hljs-comment"># Activates env. On Windows run `NAME\Scripts\activate`.</span>
<div><h3id="virtualenvironments">Virtual Environments</h3><p><strong>System for installing libraries directly into project's directory.</strong></p><pre><codeclass="bash language-bash hljs">$ python3 -m venv <name><spanclass="hljs-comment"># Creates virtual environment in current directory.</span>
$ pip3 install LIBRARY <spanclass="hljs-comment"># Installs the library into active environment.</span>
$ <spanclass="hljs-built_in">source</span><name>/bin/activate <spanclass="hljs-comment"># Activates venv. On Windows run `<name>\Scripts\activate`.</span>
$ python3 FILE <spanclass="hljs-comment"># Runs the script in active environment. Also `./FILE`.</span>
$ pip3 install <library><spanclass="hljs-comment"># Installs the library into active environment.</span>
$ deactivate <spanclass="hljs-comment"># Deactivates the active virtual environment.</span>
$ python3 <path><spanclass="hljs-comment"># Runs the script in active environment. Also `./<path>`.</span>
$ deactivate <spanclass="hljs-comment"># Deactivates the active virtual environment.</span>
<div><h2id="index"><ahref="#index"name="index">#</a>Index</h2><ul><li><strong>Only available in the <ahref="https://transactions.sendowl.com/products/78175486/4422834F/view">PDF</a>.</strong></li>
<div><h2id="index"><ahref="#index"name="index">#</a>Index</h2><ul><li><strong>Only available in the <ahref="https://transactions.sendowl.com/products/78175486/4422834F/view">PDF</a>.</strong></li>
<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>
<li><strong>Ctrl+F / ⌘F is usually sufficient.</strong></li>
<li><strong>Searching <codeclass="python hljs"><spanclass="hljs-string">'#<title>'</span></code> will limit the search to the titles.</strong></li>
<li><strong>Searching <codeclass="python hljs"><spanclass="hljs-string">'#<title>'</span></code> will limit the search to the titles.</strong></li>
xxxxxxxxxx