From 782c2b9633e62b59f15e388f93e1cbd66e05170c Mon Sep 17 00:00:00 2001 From: Lonami Date: Sun, 10 Sep 2017 15:28:01 +0200 Subject: [PATCH] Created Installing Telethon (markdown) --- Installing-Telethon.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Installing-Telethon.md diff --git a/Installing-Telethon.md b/Installing-Telethon.md new file mode 100644 index 0000000..20bdccb --- /dev/null +++ b/Installing-Telethon.md @@ -0,0 +1,24 @@ +```bash +pip install telethon +``` + +If you get something like `"SyntaxError: invalid syntax"` or any other error while installing, it's probably because `pip` defaults to Python 2, which is **not supported**. Use `pip3` instead. + +If you already have the library installed, upgrade with `pip install --upgrade telethon`. + +## Manual installation + +1. Install the required `pyaes` ([GitHub](https://github.com/ricmoo/pyaes)|[PyPi](https://pypi.python.org/pypi/pyaes)) and `rsa` ([GitHub](https://github.com/sybrenstuvel/python-rsa/)|[PyPi](https://pypi.python.org/pypi/rsa/3.4.2)) modules: `sudo -H pip install pyaes rsa` +2. Clone Telethon's GitHub repository: ``git clone https://github.com/LonamiWebs/Telethon.git`` +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 `python generate.py`. + +## Optional dependencies +If you're using the library under ARM (or even if you aren't), you may want to install `sympy` through `pip` for a substantial speed-up when generating the keys required to connect to Telegram (you can of course do this on desktop too). See [issue #199](https://github.com/LonamiWebs/Telethon/issues/199) for more. + +If `libssl` is available on your system, it will also be used wherever encryption is needed. + +If neither of these are available, a pure Python callback will be used instead, so you can still run the library wherever Python is available! \ No newline at end of file