eduardocereto / pyboleto

A Python module to create Brazilian "Boletos de Cobrança" for multiple banks
http://pypi.python.org/pypi/pyboleto/
BSD 3-Clause "New" or "Revised" License
166 stars 125 forks source link

AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' #71

Open rafaelreuber opened 6 years ago

rafaelreuber commented 6 years ago

Estou obtendo erro ao instalar o pyboleto. Na verdade o erro é por conta da biblioteca distribute. Não vi relavância do uso dessa biblioteca. A ultimo versão desse pacote é do ano de 2013. Talvez deva considerar remover essa biblioteca das dependências.

Estou usando python 3.6.6 na plataforma Linux.

pip install pyboleto
Collecting pyboleto
  Using cached https://files.pythonhosted.org/packages/6f/22/3073b4454e2dba011a95b6a1ee40a8d9fca3f3a3381b0b984b923ea146e2/pyboleto-0.3.1.tar.gz
Collecting distribute (from pyboleto)
  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-install-lcdnxqw7/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/tmp/pip-install-lcdnxqw7/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/tmp/pip-install-lcdnxqw7/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/tmp/pip-install-lcdnxqw7/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/tmp/pip-install-lcdnxqw7/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/tmp/pip-install-lcdnxqw7/distribute/pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
kaiocesar commented 5 years ago

Tem alguma resolução sobre esse problema? também estou com o mesmo problema aqui, não instala tanto na 2.7 até a 3.7 do python.

rafaelreuber commented 5 years ago

Eu submeti o a correção mas o @eduardocereto ainda não revisou. Você pode instalar a versão do meu repositório: https://github.com/rafaelreuber/pyboleto