I am trying to upgrade a python2 package made with customized bottle.py to python3. The project throwed exception of module not found bottle_memcache. This is where it points to:
from bottle.ext import memcache as mc_plugin
import memcache
application = bottle.default_app()
application.plugin = application.install(mc_plugin.Plugin())
Though i have already installed bottle in project. From getting no module found bottle-memcache i decided to install bottle-memcache but i am getting error everytime i try to.
pip3 install bottle-memcache
Collecting bottle-memcache
Using cached https://files.pythonhosted.org/packages/69/0e/48bb31fe35492610a5ad097e9e69d5faa578dc45055adf5c55eb0e4cebe1/bottle-memcache-0.2.1.tar.gz
Collecting bottle>=0.9 (from bottle-memcache)
Using cached https://files.pythonhosted.org/packages/e9/39/2bf3a1fd963e749cdbe5036a184eda8c37d8af25d1297d94b8b7aeec17c4/bottle-0.12.18-py3-none-any.whl
Collecting distribute (from bottle-memcache)
Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-qvf3skt6/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/pip-build-qvf3skt6/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/pip-build-qvf3skt6/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/tmp/pip-build-qvf3skt6/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/pip-build-qvf3skt6/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-build-qvf3skt6/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qvf3skt6/distribute/
I have tried to install it through command from terminal as well from pycharm GUI.