Installation Phyton
Installation Phyton
Please note that Nornir requires Python 3.6.2 or higher. Install Nornir with pip.
nornir-netmiko 0.1.1
flask 2.0.1
requests 2.25.1
ruamel.yaml 0.16.13
https://packaging.python.org/tutorials/installing-packages/
$ pip --version
pip 20.1 from /home/dbarroso/.virtualenvs/nornir/lib/python3.8/site-packages/pip
(python 3.8)
Package Version
--------------- -------
asgiref 3.3.4
configparser 4.0.2
Cython 0.29.24
Django 3.2.4
numpy 1.21.0
pandas 1.2.5
pip 21.1.2
pymysql2 1.3.3
python-dateutil 2.8.1
pytz 2021.1
setuptools 49.2.1
setuptools-scm 3.5.0
six 1.16.0
sqlparse 0.4.1
virtualenv 20.4.7
[soptec@qkclqa01vt ~]$
$ pip install nornir
Now we can verify that Nornir is installed and that you are able to import the
package from Python.
$ python
>>> from nornir import InitNornir
>>>
Unix/macOS
python3 --version
Win
Windows
If pip isn’t already installed, then first try to bootstrap it from the standard library:
Unix/macOS
Windows
Securely Download get-pip.py 1
Warning
Unix/macOS
Windows
Unix/macOS
Windows
Imagine you have an application that needs version 1 of LibFoo, but another application
requires version 2. How can you use both these applications? If you install everything
into /usr/lib/python3.6/site-packages (or whatever your platform’s standard location is),
it’s easy to end up in a situation where you unintentionally upgrade an application that
shouldn’t be upgraded.
Or more generally, what if you want to install an application and leave it be? If an
application works, any change in its libraries or the versions of those libraries can break
the application.
Also, what if you can’t install packages into the global site-packages directory? For
instance, on a shared host.
In all these cases, virtual environments can help you. They have their own installation
directories and they don’t share libraries with other virtual environments.
Currently, there are two common tools for creating Python virtual environments:
Using venv:
Unix/macOS
Windows
Using virtualenv:
Unix/macOS
Windows
For more information, see the venv docs or the virtualenv docs.
The use of source under Unix shells ensures that the virtual environment’s variables are
set within the current shell, and not in a subprocess (which then disappears, having no
useful effect).
In both of the above cases, Windows users should _not_ use the source command, but
should rather run the activate script directly from the command shell like so:
<DIR>\Scripts\activate
Unix/macOS
Windows
Windows
To install greater than or equal to one version and less than another:
Unix/macOS
Windows
Unix/macOS
Windows
In this case, this means to install any version “==1.4.*” version that’s also “>=1.4.2”.
If pip does not find a wheel to install, it will locally build a wheel and cache it for future
installs, instead of rebuilding the source distribution in the future.
Upgrading packages
Upgrade an already installed SomeProject to the latest from PyPI.
Unix/macOS
Windows
Unix/macOS
Windows
For more information see the User Installs section from the pip docs.
Note that the --user flag has no effect when inside a virtual environment - all
installation commands will affect the virtual environment.
On Linux and macOS you can find the user base binary directory by
running python -m site --user-base and adding bin to the end. For
example, this will typically print ~/.local (with ~ expanded to the absolute
path to your home directory) so you’ll need to add ~/.local/bin to
your PATH. You can set your PATH permanently by modifying ~/.profile.
On Windows you can find the user base binary directory by running py -
m site --user-site and replacing site-packages with Scripts. For
example, this could return C:\Users\Username\AppData\Roaming\
Python36\site-packages so you would need to set your PATH to
include C:\Users\Username\AppData\Roaming\Python36\Scripts.
You can set your user PATH permanently in the Control Panel. You may need to
log out for the PATH changes to take effect.
Requirements files
Install a list of requirements specified in a Requirements File.
Unix/macOS
Windows
Unix/macOS
Windows
Windows
Unix/macOS
Windows
Unix/macOS
Windows
Unix/macOS
Windows
Installing from local archives
Install a particular source archive file.
Unix/macOS
Windows
Unix/macOS
Windows
./s3helper --port=7777
python -m pip install --extra-index-url http://localhost:7777
SomeProject
Installing Prereleases
Find pre-release and development versions, in addition to stable versions. By default,
pip only finds stable versions.
Unix/macOS
Windows
Unix/macOS
Windows
The compatible release specifier was accepted in PEP 440 and support was
released in setuptools v8.0 and pip v6.0
INSTALANDO FLASK 2.0.1
Project description
Flask is a lightweight WSGI web application framework. It is designed to make
getting started quick and easy, with the ability to scale up to complex
applications. It began as a simple wrapper around Werkzeug and Jinja and has
become one of the most popular Python web application frameworks.
Installing
A Simple Example
app = Flask(__name__)
@app.route("/")
def hello():
Contributing
Donate
The Pallets organization develops and supports Flask and the libraries it uses.
In order to grow the community of contributors and users, and allow the
maintainers to devote more time to the projects, please donate today.
Links
Documentation: https://flask.palletsprojects.com/
Project description
Requests
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"type":"User"...'
>>> r.json()
Requests is ready for the demands of building robust and reliable HTTP–
speaking applications, for the needs of today.
Keep-Alive & Connection Pooling
International Domains and URLs
Sessions with Cookie Persistence
Browser-style TLS/SSL Verification
Basic & Digest Authentication
Familiar dict –like Cookies
Automatic Content Decompression and Decoding
Multi-part File Uploads
SOCKS Proxy Support
Connection Timeouts
Streaming Downloads
Automatic honoring of .netrc
Chunked HTTP Requests
Project description
ruamel.yaml
updated: 2021-03-05
documentation: http://yaml.readthedocs.io
repository: https://sourceforge.net/projects/ruamel-yaml/
pypi: https://pypi.org/project/ruamel.yaml/
The 0.16.13 release is the last that will tested to be working on Python 2.7. The
0.17 series will still be tested on Python 3.5, but the 0.18 will not. The 0.17
series will also stop support for the old PyYAML functions, so a `YAML()`
instance will need to be created.
Starting with version 0.15.0 the way YAML files are loaded and dumped is
changing. See the API doc for details. Currently existing functionality will throw
a warning before being changed/removed. For production systems you
should pin the version being used with ``ruamel.yaml<=0.15``. There might
be bug fixes in the 0.14 series, but new functionality is likely only to be available
via the new API.
If your package uses ruamel.yaml and is not listed on PyPI, drop me an email,
preferably with some information on how you use the package (or a link to
bitbucket/github) and I’ll keep you informed when the status of the API is stable
enough to make the transition.
Overview
Installing
Basic Usage
Details
Examples
API
Differences with PyYAML
INSTALANDO SETUPTOOLS>=20.6.8
Instalando PIP
https://access.redhat.com/solutions/1519803
Installing
Make sure you have a recent version of pip and setuptools installed. The later
needs environment marker support ( setuptools>=20.6.8 ) and that is e.g. bundled
with Python 3.4.6 but not with 3.4.4. It is probably best to do:
Optional requirements
If you have the the header files for your Python executables installed then you
can use the (non-roundtrip), but faster, C loader and emitter.
Raw
$ scl -l
python27
$which pip
/opt/rh/python27/root/usr/bin/pip
$ pip -V
pip 8.1.2 from /opt/rh/python27/root/usr/lib/python2.7/site-packages (python
2.7)
Instalando python
libffi-3.0.13-18.el7.x86_64
libffi-devel-3.0.13-18.el7.x86_64
zlib-devel-1.2.7-17.el7.x86_64
zlib-1.2.7-17.el7.x86_64
----Python3
./configure
make
make install
---------
---- Instalar modulos de python con : python3 setup.py install en ese orden
-- setuptools-45.2.0
-- setuptools_scm-3.5.0
-- pip-21.1.2
-- configparser-4.0.2.tar
-- Cython-0.29.24.tar
-- six-1.16.0
-- virtualenv-20.4.7
-- asgiref-3.3.4.tar
-- Django-3.2.4.tar
-- numpy-1.21.0.zip
-- pytz-2021.1.tar
-- pandas-1.2.5.tar
-- python-dateutil-2.8.1.tar
-- sqlparse-0.4.1.tar
-- pymysql2-1.3.3.tar.gz
-- mysqlclient-2.0.3.tar