Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install with pip #42

Closed
GoogleCodeExporter opened this issue Nov 16, 2015 · 9 comments
Closed

Cannot install with pip #42

GoogleCodeExporter opened this issue Nov 16, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

pip3 install progressbar

Collecting progressbar
  Using cached progressbar-2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/setup.py", line 5, in <module>
        import progressbar
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/progressbar/__init__.py", line 59, in <module>
        from progressbar.widgets import *
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/progressbar/widgets.py", line 121, in <module>
        class FileTransferSpeed(Widget):
      File "/Users/mortenb/Downloads/test/env/bin/../lib/python3.4/abc.py", line 133, in __new__
        cls = super().__new__(mcls, name, bases, namespace)
    ValueError: 'format' in __slots__ conflicts with class variable

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar

Original issue reported on code.google.com by mort...@gmail.com on 11 Apr 2015 at 11:16

@GoogleCodeExporter
Copy link
Author

This is a straight up Python 3 bug: 
https://docs.python.org/3/reference/datamodel.html?highlight=__slots__#object.__
slots__

"__slots__ are implemented at the class level by creating descriptors 
(Implementing Descriptors) for each variable name. As a result, class 
attributes cannot be used to set default values for instance variables defined 
by __slots__; otherwise, the class attribute would overwrite the descriptor 
assignment."

The fix should be easy; assign default values in the __init__() instead of 
class variable.


Original comment by war...@gmail.com on 1 Jun 2015 at 10:30

@GoogleCodeExporter
Copy link
Author

Looks like this is already fixed in their upstream, but not yet released.

Original comment by war...@gmail.com on 1 Jun 2015 at 10:34

@GoogleCodeExporter
Copy link
Author

Yes, it was fixed on 
https://code.google.com/p/python-progressbar/source/detail?spec=svn235f632a9c86d
7a84c607151d5127652102549ab&r=3c94a3a1ebe1325c7c605cc8f11126dcc632b04d

I thought this was included in the 2.3 release. I'll probably have to do 
another release, then

Original comment by nilton.v...@gmail.com on 2 Jun 2015 at 12:21

@avengerpenguin
Copy link

Has this fix been released yet?

@berlotto
Copy link

@avengerpenguin not yet

@yarikoptic
Copy link
Collaborator

not released by I believe fixed in master in regard of compatibility with recent python3s

$> virtualenv --python=python3 venv           
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /tmp/venv/bin/python3
Not overwriting existing python script /tmp/venv/bin/python (you must use /tmp/venv/bin/python3)
Installing setuptools, pkg_resources, pip, wheel...source done.
2 11107.....................................:Wed 25 May 2016 11:35:29 PM EDT:.
hopa:/tmp
$> source venv/bin/activate
(venv) 2 11108.....................................:Wed 25 May 2016 11:35:35 PM EDT:.
hopa:/tmp
$> pip install https://github.com/datalad/python-progressbar/archive/master.zip
Collecting https://github.com/datalad/python-progressbar/archive/master.zip
  Downloading https://github.com/datalad/python-progressbar/archive/master.zip
     \ 20kB 1.1MB/s
Installing collected packages: progressbar
  Running setup.py install for progressbar ... done
Successfully installed progressbar-2.3
(venv) 2 11109.....................................:Wed 25 May 2016 11:35:47 PM EDT:.
hopa:/tmp
$> which python
/tmp/venv/bin/python
(venv) 2 11110.....................................:Wed 25 May 2016 11:35:54 PM EDT:.
hopa:/tmp
$> python --version
Python 3.5.1+
(venv) 2 11111.....................................:Wed 25 May 2016 11:35:57 PM EDT:.
hopa:/tmp
$> pip --version
pip 8.1.2 from /tmp/venv/local/lib/python3.5/site-packages (python 3.5)

@fenchu
Copy link

fenchu commented Sep 15, 2017

Please Gentlemen, Hit this bug today 1.5 year later. Still not released. Master works. python3 is taking over the world. Thanks

@yarikoptic
Copy link
Collaborator

I just switched to tqdm

@MiX1964
Copy link

MiX1964 commented Jan 28, 2018

I don't know if still relevant but I experienced the same issue while trying to pip install progressbar.
Found a fix in #54
pip3 install progressbar33 worked for me

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

No branches or pull requests

6 participants