Try ERPNext Buy Support Partners Foundation

All bench commands failing on CentOS7 as bench reverted back from python3 to python2.7

Hi,
I don’t know if its an issue with bench or with centos7 update. But when I updated my production server which is running centos7 I think the bench is now messed up.

Basically when I run any command from bench its failing as below:

[rigpl@www frappe-bench]$ bench --help
Traceback (most recent call last):
  File "/usr/bin/bench", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3191, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3175, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests==2.22.0' distribution was not found and is required by bench

Now if you see that the bench is trying to look into requests for python2.7 whereas AFAIK the system was setup to refer to python3.6, since both python2.7 and python3.6 are installed on centos7 I cannot seem to figure out how can I rectify this issue, eventhough my production server is running but it seems I cannot use bench commands to update or anything.

[rigpl@www frappe-bench]$ python --version
Python 2.7.5
[rigpl@www frappe-bench]$ python3 --version
Python 3.6.8

I have tried the below commands but to no avail:

[rigpl@www frappe-bench]$ pip3 install -e bench-repo
Defaulting to user installation because normal site-packages is not writeable
ERROR: bench-repo is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).

Any idea as to how can I get the bench commands to work again.

try if this works,

  1. Uninstall bench
sudo pip uninstall bench
  1. reinstall bench with pip3
sudo pip3 install -e ./path/to/bench-repo

Use sudo or execute commands as root.

Well I did try this below but still I am unable to run any bench command from inside the frappe-bench folder.

[rigpl@www ~]$ pip3 install -e ./bench-repo/ 
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/rigpl/bench-repo
Requirement already satisfied: Click==7.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (7.0)
Requirement already satisfied: GitPython==2.1.15 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.1.15)
Requirement already satisfied: honcho==1.0.1 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.0.1)
Requirement already satisfied: Jinja2==2.10.3 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.10.3)
Requirement already satisfied: python-crontab==2.4.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.4.0)
Requirement already satisfied: requests==2.22.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.22.0)
Requirement already satisfied: semantic-version==2.8.2 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.8.2)
Requirement already satisfied: setuptools==40.8.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (40.8.0)
Requirement already satisfied: six==1.12.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.12.0)
Requirement already satisfied: virtualenv==16.6.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (16.6.0)
Requirement already satisfied: gitdb2<3,>=2 in ./.local/lib/python3.6/site-packages (from GitPython==2.1.15->frappe-bench==5.1.0) (2.0.6)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from Jinja2==2.10.3->frappe-bench==5.1.0) (1.1.1)
Requirement already satisfied: python-dateutil in ./.local/lib/python3.6/site-packages (from python-crontab==2.4.0->frappe-bench==5.1.0) (2.8.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2.8)
Requirement already satisfied: smmap2>=2.0.0 in ./.local/lib/python3.6/site-packages (from gitdb2<3,>=2->GitPython==2.1.15->frappe-bench==5.1.0) (2.0.5)
Installing collected packages: frappe-bench
  Attempting uninstall: frappe-bench
    Found existing installation: frappe-bench 5.1.0
    Uninstalling frappe-bench-5.1.0:
      Successfully uninstalled frappe-bench-5.1.0
  Running setup.py develop for frappe-bench
Successfully installed frappe-bench

[rigpl@www ~]$ cd frappe-bench/
[rigpl@www frappe-bench]$ bench --help
Traceback (most recent call last):
  File "/usr/bin/bench", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3191, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3175, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests==2.22.0' distribution was not found and is required by bench

[rigpl@www frappe-bench]$ pip uninstall bench
WARNING: Skipping bench as it is not installed.

Just tried to install using python 3.6 on centos with the below commands but still the same errors, I think the frappe-bench folder is still unable to call bench using python3.6

[rigpl@www ~]$ python3.6 -m pip install -e bench-repo
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/rigpl/bench-repo
Requirement already satisfied: Click==7.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (7.0)
Requirement already satisfied: GitPython==2.1.15 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.1.15)
Requirement already satisfied: honcho==1.0.1 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.0.1)
Requirement already satisfied: Jinja2==2.10.3 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.10.3)
Requirement already satisfied: python-crontab==2.4.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.4.0)
Requirement already satisfied: requests==2.22.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.22.0)
Requirement already satisfied: semantic-version==2.8.2 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.8.2)
Requirement already satisfied: setuptools==40.8.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (40.8.0)
Requirement already satisfied: six==1.12.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.12.0)
Requirement already satisfied: virtualenv==16.6.0 in ./.local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (16.6.0)
Requirement already satisfied: gitdb2<3,>=2 in ./.local/lib/python3.6/site-packages (from GitPython==2.1.15->frappe-bench==5.1.0) (2.0.6)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from Jinja2==2.10.3->frappe-bench==5.1.0) (1.1.1)
Requirement already satisfied: python-dateutil in ./.local/lib/python3.6/site-packages (from python-crontab==2.4.0->frappe-bench==5.1.0) (2.8.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2019.11.28)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (1.25.8)
Requirement already satisfied: smmap2>=2.0.0 in ./.local/lib/python3.6/site-packages (from gitdb2<3,>=2->GitPython==2.1.15->frappe-bench==5.1.0) (2.0.5)
Installing collected packages: frappe-bench
  Running setup.py develop for frappe-bench
Successfully installed frappe-bench
[rigpl@www ~]$ sudo python3.6 -m pip install -e bench-repo
Obtaining file:///home/rigpl/bench-repo
Collecting Click==7.0
  Using cached Click-7.0-py2.py3-none-any.whl (81 kB)
Collecting GitPython==2.1.15
  Downloading GitPython-2.1.15-py2.py3-none-any.whl (452 kB)
     |████████████████████████████████| 452 kB 8.5 MB/s
Collecting honcho==1.0.1  
  Using cached honcho-1.0.1-py2.py3-none-any.whl (21 kB)
Collecting Jinja2==2.10.3 
  Using cached Jinja2-2.10.3-py2.py3-none-any.whl (125 kB)
Collecting python-crontab==2.4.0
  Using cached python-crontab-2.4.0.tar.gz (50 kB)
Collecting requests==2.22.0
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting semantic-version==2.8.2
  Using cached semantic_version-2.8.2-py2.py3-none-any.whl (15 kB)
Collecting setuptools==40.8.0
  Using cached setuptools-40.8.0-py2.py3-none-any.whl (575 kB)
Collecting six==1.12.0
  Using cached six-1.12.0-py2.py3-none-any.whl (10 kB)
Collecting virtualenv==16.6.0
  Using cached virtualenv-16.6.0-py2.py3-none-any.whl (2.0 MB)
Collecting gitdb2<3,>=2   
  Using cached gitdb2-2.0.6-py2.py3-none-any.whl (63 kB)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from Jinja2==2.10.3->frappe-bench==5.1.0) (1.1.1)
Collecting python-dateutil
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (1.25.9)
Collecting idna<2.9,>=2.5 
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2020.4.5.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (3.0.4)
Collecting smmap2>=2.0.0  
  Downloading smmap2-3.0.1-py3-none-any.whl (1.1 kB)
Collecting smmap>=3.0.1   
  Downloading smmap-3.0.4-py2.py3-none-any.whl (25 kB)
Using legacy setup.py install for python-crontab, since package 'wheel' is not installed.
Installing collected packages: Click, smmap, smmap2, gitdb2, GitPython, honcho, Jinja2, six, python-dateutil, python-crontab, idna, requests, semantic-version, setuptools, virtualenv, frappe-bench   
  WARNING: The script honcho is installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Attempting uninstall: Jinja2
    Found existing installation: Jinja2 2.11.1
    Uninstalling Jinja2-2.11.1:
      Successfully uninstalled Jinja2-2.11.1
  Attempting uninstall: six
    Found existing installation: six 1.14.0
    Uninstalling six-1.14.0:
      Successfully uninstalled six-1.14.0
    Running setup.py install for python-crontab ... done
  Attempting uninstall: idna
    Found existing installation: idna 2.9
    Uninstalling idna-2.9:
      Successfully uninstalled idna-2.9
  Attempting uninstall: requests
    Found existing installation: requests 2.23.0
    Uninstalling requests-2.23.0:
      Successfully uninstalled requests-2.23.0
  Attempting uninstall: setuptools
    Found existing installation: setuptools 45.2.0
    Uninstalling setuptools-45.2.0:
      Successfully uninstalled setuptools-45.2.0
  WARNING: The scripts easy_install and easy_install-3.6 are installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script virtualenv is installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py develop for frappe-bench
Successfully installed Click-7.0 GitPython-2.1.15 Jinja2-2.10.3 frappe-bench gitdb2-2.0.6 honcho-1.0.1 idna-2.8 python-crontab-2.4.0 python-dateutil-2.8.1 requests-2.22.0 semantic-version-2.8.2 setuptools-40.8.0 six-1.12.0 smmap-3.0.4 smmap2-3.0.1 virtualenv-16.6.0
[rigpl@www ~]$
[rigpl@www ~]$ cd frappe-bench/
[rigpl@www frappe-bench]$ bench --help
Traceback (most recent call last):
  File "/usr/bin/bench", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3191, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3175, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests==2.22.0' distribution was not found and is required by bench

Well just found a workaround. I had checked the file /usr/bin/bench and edited the file to use python3.6 instead of python2

#!/usr/bin/python3.6
# EASY-INSTALL-ENTRY-SCRIPT: 'bench','console_scripts','bench'
__requires__ = 'bench'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('bench', 'console_scripts', 'bench')()
    )

Changed the first line from python2 to python3.6, but now I am getting the issue that bench is installed in editable mode, now I need to figure out how to change that for a production server:

[rigpl@www frappe-bench]$ bench --version
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

5.1.0

I did run the command sudo pip3.6 install -e ./bench-repo but still the bench is installed in the editable mode.

[rigpl@www ~]$ sudo pip3.6 install -e ./bench-repo
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Obtaining file:///home/rigpl/bench-repo
Requirement already satisfied: Click==7.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (7.0)
Requirement already satisfied: GitPython==2.1.15 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.1.15)
Requirement already satisfied: honcho==1.0.1 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.0.1)
Requirement already satisfied: Jinja2==2.10.3 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.10.3)
Requirement already satisfied: python-crontab==2.4.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.4.0)
Requirement already satisfied: requests==2.22.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.22.0)
Requirement already satisfied: semantic-version==2.8.2 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (2.8.2)
Requirement already satisfied: setuptools==40.8.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (40.8.0)
Requirement already satisfied: six==1.12.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (1.12.0)
Requirement already satisfied: virtualenv==16.6.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench==5.1.0) (16.6.0)
Requirement already satisfied: gitdb2<3,>=2 in /usr/local/lib/python3.6/site-packages (from GitPython==2.1.15->frappe-bench==5.1.0) (2.0.6)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from Jinja2==2.10.3->frappe-bench==5.1.0) (1.1.1)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.6/site-packages (from python-crontab==2.4.0->frappe-bench==5.1.0) (2.8.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (2020.4.5.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench==5.1.0) (1.25.9)
Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.6/site-packages (from gitdb2<3,>=2->GitPython==2.1.15->frappe-bench==5.1.0) (3.0.1)
Requirement already satisfied: smmap>=3.0.1 in /usr/local/lib/python3.6/site-packages (from smmap2>=2.0.0->gitdb2<3,>=2->GitPython==2.1.15->frappe-bench==5.1.0) (3.0.4)
Installing collected packages: frappe-bench
  Attempting uninstall: frappe-bench
    Found existing installation: frappe-bench 5.1.0
    Can't uninstall 'frappe-bench'. No files were found to uninstall.
  Running setup.py develop for frappe-bench
Successfully installed frappe-bench

Using pip install -e ./bench-repo installs the bench from the locally cloned bench-repo directory. That is called the editable mode. Because you can edit the bench source code and it’ll reflect when bench command is executed. It is recommended if you’re developing bench itself or sending PR to bench repo.

If pip install frappe-bench is used, it’ll pull the pypi package and install it. You’ll not be able to do bench development. Recommended when you know editing bench is not required.

1 Like

Still can’t seem to get around the correct installation for bench I am still in editable mode and I guess some time there are issues with bench update due to this mode I guess for some file permissions like deleting the pycache files and since its my production server I cannot seem to find a way to get the bench to behave.

I have tried the following:

[rigpl@www ~]$ ls
bench-repo  frappe-bench  install.py 
[rigpl@www frappe-bench]$ bench --help | grep install
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
  install                  Install system dependencies for setting up
  install-app                 Install a new app to site
  make-demo                   Reinstall site and setup demo
  reinstall                   Reinstall site ie.
  remove-from-installed-apps  Remove app from site's installed-apps list
  uninstall-app               Remove app and linked modules from site
  version                     Show the versions of all the installed apps
[rigpl@www frappe-bench]$ cd ..
[rigpl@www ~]$ pip uninstall bench
WARNING: Skipping bench as it is not installed.
[rigpl@www ~]$ pip uninstall frappe-bench
Found existing installation: frappe-bench 5.1.0
Can't uninstall 'frappe-bench'. No files were found to uninstall.
[rigpl@www ~]$ pip uninstall bench-repo
WARNING: Skipping bench-repo as it is not installed.
[rigpl@www ~]$ pip3.6 uninstall bench
WARNING: Skipping bench as it is not installed.
[rigpl@www ~]$ pip3.6 uninstall frappe-bench
Found existing installation: frappe-bench 5.1.0
Can't uninstall 'frappe-bench'. No files were found to uninstall.
[rigpl@www ~]$ pip3.6 uninstall bench-repo
WARNING: Skipping bench-repo as it is not installed.
[rigpl@www ~]$ which -a pip
/usr/local/bin/pip
~/.local/bin/pip
[rigpl@www ~]$ which -a pip3.6
/usr/local/bin/pip3.6
/usr/bin/pip3.6
~/.local/bin/pip3.6
[rigpl@www ~]$ pip --version
pip 20.1.1 from /home/rigpl/.local/lib/python3.6/site-packages/pip (python 3.6)
[rigpl@www ~]$ pip3.6 --version
pip 20.1.1 from /home/rigpl/.local/lib/python3.6/site-packages/pip (python 3.6)

I think the problem is that I am or should I say my production server is confused as to which pip should I use since which pip is showing python version 2.7 usr/bin files but on checking the version the pip is pointing towards python3.6

Any idea how can I resolve this issue, if its an issue at all.

1 Like

i have this error today ,
sudo pip3 install requests==2.22.0

and bench works with me again without a problem :wink:

Hello, i came to this post because I am facing the same problem.

When using pip install frappe-bench , bench is not installed. Instead, this is shown:

Requirement already satisfied: Click==7.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (7.0)
Requirement already satisfied: GitPython==2.1.15 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (2.1.15)
Requirement already satisfied: honcho==1.0.1 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (1.0.1)
Requirement already satisfied: Jinja2==2.10.3 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (2.10.3)
Requirement already satisfied: python-crontab==2.4.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (2.4.0)
Requirement already satisfied: requests==2.22.0 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (2.22.0)
Requirement already satisfied: semantic-version==2.8.2 in /usr/local/lib/python3.6/site-packages (from frappe-bench) (2.8.2)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (from frappe-bench) (40.8.0)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from frappe-bench) (1.12.0)
Requirement already satisfied: virtualenv in /usr/local/lib/python3.6/site-packages (from frappe-bench) (16.6.0)
Requirement already satisfied: gitdb2<3,>=2 in /usr/local/lib/python3.6/site-packages (from GitPython==2.1.15->frappe-bench) (2.0.6)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib64/python3.6/site-packages (from Jinja2==2.10.3->frappe-bench) (1.1.1)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.6/site-packages (from python-crontab==2.4.0->frappe-bench) (2.8.1)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench) (2020.11.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests==2.22.0->frappe-bench) (3.0.4)
Requirement already satisfied: smmap2>=2.0.0 in /usr/local/lib/python3.6/site-packages (from gitdb2<3,>=2->GitPython==2.1.15->frappe-bench) (3.0.1)
Requirement already satisfied: smmap>=3.0.1 in /usr/local/lib/python3.6/site-packages (from smmap2>=2.0.0->gitdb2<3,>=2->GitPython==2.1.15->frappe-bench) (3.0.4)

And bench is not installed. That is why I needed to clone the repository. How can I install bench without the need to clone the repository?

Regards
Jaime