2018-01-06 11:18:15 +00:00
|
|
|
Quick Installation
|
|
|
|
==================
|
|
|
|
|
|
|
|
The most straightforward and recommended way to install or upgrade Pyrogram is by using **pip**:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ pip install --upgrade pyrogram
|
|
|
|
|
2018-01-11 17:14:26 +00:00
|
|
|
.. important::
|
|
|
|
|
|
|
|
Pyrogram only works on Python 3.3 or higher; if your **pip** points to Python 2.x use **pip3** instead.
|
|
|
|
|
|
|
|
Also, if you are getting an error while installing or importing the library, please update setuptools and try again.
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ pip install --upgrade setuptools
|
|
|
|
|
2018-01-06 11:18:15 +00:00
|
|
|
Bleeding Edge
|
|
|
|
-------------
|
|
|
|
|
|
|
|
If you want the latest development version of the library, you can either install it automatically with:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ pip install git+https://github.com/pyrogram/pyrogram.git
|
|
|
|
|
|
|
|
or manually, using:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ git clone https://github.com/pyrogram/pyrogram.git
|
|
|
|
$ cd pyrogram
|
|
|
|
$ python setup.py install
|
|
|
|
|
|
|
|
Verifying
|
|
|
|
---------
|
|
|
|
|
|
|
|
To verify that Pyrogram is correctly installed, open a Python shell and try to import it.
|
|
|
|
If no errors show up you are good to go.
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
>>> import pyrogram
|
|
|
|
>>> pyrogram.__version__
|
2018-01-09 20:20:13 +00:00
|
|
|
'0.3.3'
|