aspineux / pyzmail

Pyzmail is a high level mail library for Python, providing functions to read, compose and send emails
60 stars 31 forks source link

Unable to install on Python 3.6 #15

Open angelkenneth opened 7 years ago

angelkenneth commented 7 years ago

Hi,

After running the command in pip install pyzmail, i get an issue with distribute. I am unable to find the maintenance page of that package so i decided to report it here instead.

Collecting pyzmail
  Using cached pyzmail-1.0.3.tar.gz
Collecting distribute (from pyzmail)
  Using cached 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-qu6a358p/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/tmp/pip-build-qu6a358p/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/tmp/pip-build-qu6a358p/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/tmp/pip-build-qu6a358p/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/tmp/pip-build-qu6a358p/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/tmp/pip-build-qu6a358p/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-qu6a358p/distribute/
angelkenneth commented 7 years ago

As an update, when i comment out the line extra_options['install_requires']=['distribute'] around line 114 of /pyzmail/setup.py the package install properly. I understand that we need to keep this compatible with < Python 3.6 . I will submit a patch to this library soon.

@aspineux please reply, if your still active in this project, so i know my Pull request maybe reviewed and accepted.

cfenollosa commented 7 years ago

Hi @GheloAce, I'm also interested in this fix. Can you please share the patch? Thanks!

c-w commented 7 years ago

Tagging @cfenollosa @GheloAce in case you're still using this library and are looking for a more maintainable way forward.

This repository unfortunately seems inactive, so I created a new package on PyPI that includes all the fixes to make pyzmail pip-installable on Python 3.6.

The name of the new package is pyzmail36. You can just update your requirements.txt file to list pyzmail36 instead of pyzmail and all of the rest of your code shouldn't need to change.

If you find any issues with running pyzmail36, please report them against my fork and I'll look into them.

mph-code commented 5 years ago

This issue can be resolved as follows with two commands:

pip install ez_setup

easy_install pyzmail

Source