2017-11-20 07:12:31 +03:00
|
|
|
.. _installation:
|
|
|
|
|
2018-01-05 02:59:53 +03:00
|
|
|
============
|
2017-11-20 07:12:31 +03:00
|
|
|
Installation
|
2018-01-05 02:59:53 +03:00
|
|
|
============
|
2017-11-20 07:12:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
Automatic Installation
|
2018-01-05 02:59:53 +03:00
|
|
|
**********************
|
|
|
|
|
2017-11-20 07:12:31 +03:00
|
|
|
To install Telethon, simply do:
|
|
|
|
|
2018-01-12 12:08:40 +03:00
|
|
|
``pip3 install telethon``
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-12 12:08:40 +03:00
|
|
|
Needless to say, you must have Python 3 and PyPi installed in your system.
|
|
|
|
See https://python.org and https://pypi.python.org/pypi/pip for more.
|
2017-11-20 07:12:31 +03:00
|
|
|
|
|
|
|
If you already have the library installed, upgrade with:
|
|
|
|
|
2018-01-12 12:08:40 +03:00
|
|
|
``pip3 install --upgrade telethon``
|
2017-11-20 07:12:31 +03:00
|
|
|
|
|
|
|
You can also install the library directly from GitHub or a fork:
|
|
|
|
|
2018-01-05 02:59:53 +03:00
|
|
|
.. code-block:: sh
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-12 12:08:40 +03:00
|
|
|
# pip3 install git+https://github.com/LonamiWebs/Telethon.git
|
2017-11-20 07:12:31 +03:00
|
|
|
or
|
|
|
|
$ git clone https://github.com/LonamiWebs/Telethon.git
|
|
|
|
$ cd Telethon/
|
|
|
|
# pip install -Ue .
|
|
|
|
|
|
|
|
If you don't have root access, simply pass the ``--user`` flag to the pip command.
|
|
|
|
|
|
|
|
|
|
|
|
Manual Installation
|
2018-01-05 02:59:53 +03:00
|
|
|
*******************
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-05 02:59:53 +03:00
|
|
|
1. Install the required ``pyaes`` (`GitHub`__ | `PyPi`__) and
|
|
|
|
``rsa`` (`GitHub`__ | `PyPi`__) modules:
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-12 12:08:40 +03:00
|
|
|
``sudo -H pip3 install pyaes rsa``
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-05 02:59:53 +03:00
|
|
|
2. Clone Telethon's GitHub repository:
|
|
|
|
``git clone https://github.com/LonamiWebs/Telethon.git``
|
2017-11-20 07:12:31 +03:00
|
|
|
|
|
|
|
3. Enter the cloned repository: ``cd Telethon``
|
|
|
|
|
|
|
|
4. Run the code generator: ``python3 setup.py gen_tl``
|
|
|
|
|
|
|
|
5. Done!
|
|
|
|
|
|
|
|
To generate the documentation, ``cd docs`` and then ``python3 generate.py``.
|
|
|
|
|
|
|
|
|
|
|
|
Optional dependencies
|
2018-01-05 02:59:53 +03:00
|
|
|
*********************
|
2017-11-20 07:12:31 +03:00
|
|
|
|
2018-01-05 02:59:53 +03:00
|
|
|
If ``libssl`` is available on your system, it will be used wherever encryption
|
|
|
|
is needed, but otherwise it will fall back to pure Python implementation so it
|
|
|
|
will also work without it.
|
2017-11-20 07:12:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
__ https://github.com/ricmoo/pyaes
|
|
|
|
__ https://pypi.python.org/pypi/pyaes
|
|
|
|
__ https://github.com/sybrenstuvel/python-rsa/
|
|
|
|
__ https://pypi.python.org/pypi/rsa/3.4.2
|