da03 / Attention-OCR

Visual Attention based OCR
MIT License
1.11k stars 362 forks source link

ImportError: cannot import name ContextualZipFile #85

Closed famunir closed 6 years ago

famunir commented 6 years ago

Following the installing instruction of Tensorflow, when I run the following command:

sudo easy_install -U pip

There is following error:

Traceback (most recent call last): File "/usr/bin/easy_install", line 9, in load_entry_point('setuptools==20.7.0', 'console_scripts', 'easy_install')() File "/home/fahad/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 572, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/fahad/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 2755, in load_entry_point return ep.load() File "/home/fahad/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 2408, in load return self.resolve() File "/home/fahad/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 2414, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 50, in from setuptools.archive_util import unpack_archive File "/usr/lib/python2.7/dist-packages/setuptools/archive_util.py", line 15, in from pkg_resources import ensure_directory, ContextualZipFile ImportError: cannot import name ContextualZipFile

Any ideas how do I resolve this issue?

famunir commented 6 years ago

The following solution worked for me:

sudo pip install pip --user --upgrade sudo apt-get install python3-pip sudo pip3 install --upgrade setuptools