Skip to content

python 3.3 import errors #28

Open
Open

Description

@GoogleCodeExporter
When trying to install from the mercurial tip (changeset 36:3c94a3a1ebe1 from 
September 21), I get the following error:

     Traceback (most recent call last):
      File "setup.py", line 5, in <module>
        import progressbar
      File "/usr/local/src/python-progressbar/progressbar/__init__.py", line 47, in <module>
        from compat import *
    ImportError: No module named 'compat'

This is because the imports aren't relative to the current package. Changing 
the imports in __init__.py to 

     from .compat import *

and so on works, as would `from progressbar.compat`.

I also needed to change `import widgets` to `from . import widgets` in 
`progressbar.py`. Then everything worked.

Also note that the version in pypi (2.3-dev) still has the `__slots__` problem 
that was fixed back in September - it'd be nice to release a new version with 
these two problems fixed, so `pip install progressbar` works.

Original issue reported on code.google.com by dou...@gmail.com on 17 Dec 2012 at 1:31

Activity

  1. jan-glx commented on Feb 10, 2016

    @jan-glx
  2. danodonovan commented on Sep 12, 2016

    @danodonovan

    This fork has python 3 compatibility progressbar33 and works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions