Sabtu, 07 Juli 2018

Install pyTelegramBotAPI on Linux machine

  Tidak ada komentar
Some time as sysadmin we need to setup the host to login using ssh without typing password
Step 1: Install Requirement environment
First we need install epel release before we can install pip
[[email protected] ~]$ sudo yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
 Install pip by running following command
[[email protected] ~]$ sudo yum install -y python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Install BeautifulSoap plugin with pip by running following command 
[[email protected] ~]$
[[email protected] ~]$ sudo pip install BeautifulSoup4
Collecting BeautifulSoup4
  Downloading (86kB)
    100% |████████████████████████████████| 92kB 1.1MB/s
Installing collected packages: BeautifulSoup4
Successfully installed BeautifulSoup4-4.6.0
Step 2: Install pyTelegramBotAPI
Install the telegram bot api using pip by running following command 
[[email protected] ~]$
[[email protected] ~]$ sudo pip install pyTelegramBotAPI
Collecting pyTelegramBotAPI
  Downloading (53kB)
    100% |████████████████████████████████| 61kB 1.4MB/s
Collecting requests (from pyTelegramBotAPI)
  Downloading (91kB)
    100% |████████████████████████████████| 92kB 2.2MB/s
Collecting six (from pyTelegramBotAPI)
Collecting idna<2.8,>=2.5 (from requests->pyTelegramBotAPI)
  Downloading (58kB)
    100% |████████████████████████████████| 61kB 2.4MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->pyTelegramBotAPI)
  Downloading (133kB)
    100% |████████████████████████████████| 143kB 2.6MB/s
Collecting urllib3<1.24,>=1.21.1 (from requests->pyTelegramBotAPI)
  Downloading (133kB)
    100% |████████████████████████████████| 143kB 1.6MB/s
Collecting certifi>=2017.4.17 (from requests->pyTelegramBotAPI)
  Downloading (150kB)
    100% |████████████████████████████████| 153kB 1.3MB/s
Installing collected packages: idna, chardet, urllib3, certifi, requests, six, pyTelegramBotAPI
  Running install for pyTelegramBotAPI ... done
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7 pyTelegramBotAPI-3.6.3 requests-2.19.1 six-1.11.0 urllib3-1.23
You are using pip version 8.1.2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[[email protected] ~]$
Create file for telegram bot command and config
[[email protected] ~]$ vi
[[email protected] ~]$ vi
[[email protected] ~]$
[[email protected] ~]$ ls
[[email protected] ~]$
[[email protected] ~]$ chmod 755
[[email protected] ~]$ ls  s9s_tmp
[[email protected] ~]$
[[email protected] ~]$ phyton

Tidak ada komentar :

Posting Komentar