Guys i get a bench update error

i just posted a while ago another topic with the same error and it was merged into another topic that suppose to have the solution, but i tried it and it does not work, and i cannot post on that topic as it is closed
the error is

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/frappe/bench-repo/bench/cli.py", line 4, in <module>
    from bench.app import get_apps
  File "/home/frappe/bench-repo/bench/app.py", line 15, in <module>
    import git
  File "/usr/local/lib/python3.5/dist-packages/git/__init__.py", line 38, in <module>
    from git.exc import *                       # @NoMove @IgnorePep8
  File "/usr/local/lib/python3.5/dist-packages/git/exc.py", line 9, in <module>
    from git.compat import UnicodeMixin, safe_decode, string_types
  File "/usr/local/lib/python3.5/dist-packages/git/compat.py", line 16, in <module>
    from gitdb.utils.compat import (
ImportError: No module named 'gitdb.utils.compat'

Please help and DO not move it in to the other post as it DID NOT FIX IT FOR ME
Thanks

Please note this bug is not related to Frappe/ERPNext, it is more of python modules misconfiguration/bug/issue.

You could try upgrading your current gitdb system installation to fix that, or remove the system wide installation altogether.

for bench specific version installation follow:

su - frappe
cd ~/frappe-bench/
source env/bin/activate
pip3 uninstall gitdb2 #updated
pip3 install --upgrade gitdb2==2.0.6 gitdb==0.6.4

ok i did as you written here, but still the same error

You might need to get rid of system wide installed package first.
If that doesn’t work, then please search on Internet for help, its known issue with python packages…

can you just mention a link i could follow to do so?
Thanks

I have edited my answer, please check above. redo all the steps.

still the same problem, do not know why, i made it env specific and made it normal (systemwide) and still the same error

any solution?

well, i just solved it today by first removing gitpython installation from inside the env

pip3 uninstall gitpython
pip3 install --upgrade gitpython==2.1.11

now to continue with your solution

pip3 uninstall gitdb2
pip3 install --upgrade gitdb2==2.0.6 gitdb==0.6.4

Thanks alot

2 Likes