installing progressbar Python package
Question:
I get this error:
E:opensource_codessemi-auto-annosrc>pip install progressbar
Collecting progressbar
Downloading progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarsetup.py", line 5, in <module>
import progressbar
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarprogressbar__init__.py", line 59, in <module>
from progressbar.widgets import *
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarprogressbarwidgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "C:ProgramDataAnaconda3libabc.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 C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbar
and I have:
E:opensource_codessemi-auto-annosrc>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
how should I install progressbar for Python 3.6.0?
Answers:
Not sure if it is the best method, but it works for me:
$ git clone https://github.com/coagulant/progressbar-python3.git
Cloning into 'progressbar-python3'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ ls
cnpy/ depth-masking-src/ gesture_recognition/ semi-auto-anno/
cnpy_cmake/ depth-masking-src.zip progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ cd progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes/progressbar-python3 (master)
$ ls
ChangeLog.yaml LICENSE.txt progressbar/ README.txt tox.ini
examples.py* MANIFEST.in README.md setup.py*
E:opensource_codesprogressbar-python3>python setup.py install
C:ProgramDataAnaconda3libsite-packagessetuptools-27.2.0-py3.6.eggsetuptoolsdist.py:331: UserWarning: Normalizing '2.3dev' to '2.3.dev0'
running install
running bdist_egg
running egg_info
creating progressbar.egg-info
writing progressbar.egg-infoPKG-INFO
writing dependency_links to progressbar.egg-infodependency_links.txt
writing top-level names to progressbar.egg-infotop_level.txt
writing manifest file 'progressbar.egg-infoSOURCES.txt'
reading manifest file 'progressbar.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'progressbar.egg-infoSOURCES.txt'
installing library code to buildbdist.win-amd64egg
running install_lib
running build_py
creating build
creating buildlib
creating buildlibprogressbar
copying progressbarcompat.py -> buildlibprogressbar
copying progressbarprogressbar.py -> buildlibprogressbar
copying progressbarwidgets.py -> buildlibprogressbar
copying progressbar__init__.py -> buildlibprogressbar
creating buildbdist.win-amd64
creating buildbdist.win-amd64egg
creating buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarcompat.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarprogressbar.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarwidgets.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbar__init__.py -> buildbdist.win-amd64eggprogressbar
byte-compiling buildbdist.win-amd64eggprogressbarcompat.py to compat.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbarprogressbar.py to progressbar.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbarwidgets.py to widgets.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbar__init__.py to __init__.cpython-36.pyc
creating buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infoPKG-INFO -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infoSOURCES.txt -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infodependency_links.txt -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infotop_level.txt -> buildbdist.win-amd64eggEGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'distprogressbar-2.3.dev0-py3.6.egg' and adding 'buildbdist.win-amd64egg' to it
removing 'buildbdist.win-amd64egg' (and everything under it)
Processing progressbar-2.3.dev0-py3.6.egg
Copying progressbar-2.3.dev0-py3.6.egg to c:programdataanaconda3libsite-packages
Adding progressbar 2.3.dev0 to easy-install.pth file
Installed c:programdataanaconda3libsite-packagesprogressbar-2.3.dev0-py3.6.egg
Processing dependencies for progressbar==2.3.dev0
Finished processing dependencies for progressbar==2.3.dev0
E:opensource_codesprogressbar-python3>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>>
conda install progressbar2
or maybe
pip install progressbar2
I had been facing the same issue when trying to implement the progressbar for a code. Above suggestion : conda install progressbar2
still holds good.
(base) PS C:Usersuser8> conda install progressbar2
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:ProgramDataAnaconda3
added / updated specs:
- progressbar2
The following packages will be downloaded:
package | build
---------------------------|-----------------
progressbar2-4.2.0 | py39haa95532_0 52 KB
python-utils-3.3.3 | py39haa95532_0 36 KB
------------------------------------------------------------
Total: 88 KB
The following NEW packages will be INSTALLED:
progressbar2 pkgs/main/win-64::progressbar2-4.2.0-py39haa95532_0 None
python-utils pkgs/main/win-64::python-utils-3.3.3-py39haa95532_0 None
Proceed ([y]/n)? y
Downloading and Extracting Packages
python-utils-3.3.3 | 36 KB | ############################################################################ | 100%
progressbar2-4.2.0 | 52 KB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
In case you IDE does not identify the installation, restart and retry. You may install this package in your Virtual environment separately in case you are using one.
The import in your program however, does not change. It still remains :
import progressbar
I get this error:
E:opensource_codessemi-auto-annosrc>pip install progressbar
Collecting progressbar
Downloading progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarsetup.py", line 5, in <module>
import progressbar
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarprogressbar__init__.py", line 59, in <module>
from progressbar.widgets import *
File "C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbarprogressbarwidgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "C:ProgramDataAnaconda3libabc.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 C:Usersmona6AppDataLocalTemppip-build-0_37al8dprogressbar
and I have:
E:opensource_codessemi-auto-annosrc>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
how should I install progressbar for Python 3.6.0?
Not sure if it is the best method, but it works for me:
$ git clone https://github.com/coagulant/progressbar-python3.git
Cloning into 'progressbar-python3'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ ls
cnpy/ depth-masking-src/ gesture_recognition/ semi-auto-anno/
cnpy_cmake/ depth-masking-src.zip progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes
$ cd progressbar-python3/
mona6@DESKTOP-0JQ770H MINGW64 /e/opensource_codes/progressbar-python3 (master)
$ ls
ChangeLog.yaml LICENSE.txt progressbar/ README.txt tox.ini
examples.py* MANIFEST.in README.md setup.py*
E:opensource_codesprogressbar-python3>python setup.py install
C:ProgramDataAnaconda3libsite-packagessetuptools-27.2.0-py3.6.eggsetuptoolsdist.py:331: UserWarning: Normalizing '2.3dev' to '2.3.dev0'
running install
running bdist_egg
running egg_info
creating progressbar.egg-info
writing progressbar.egg-infoPKG-INFO
writing dependency_links to progressbar.egg-infodependency_links.txt
writing top-level names to progressbar.egg-infotop_level.txt
writing manifest file 'progressbar.egg-infoSOURCES.txt'
reading manifest file 'progressbar.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'progressbar.egg-infoSOURCES.txt'
installing library code to buildbdist.win-amd64egg
running install_lib
running build_py
creating build
creating buildlib
creating buildlibprogressbar
copying progressbarcompat.py -> buildlibprogressbar
copying progressbarprogressbar.py -> buildlibprogressbar
copying progressbarwidgets.py -> buildlibprogressbar
copying progressbar__init__.py -> buildlibprogressbar
creating buildbdist.win-amd64
creating buildbdist.win-amd64egg
creating buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarcompat.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarprogressbar.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbarwidgets.py -> buildbdist.win-amd64eggprogressbar
copying buildlibprogressbar__init__.py -> buildbdist.win-amd64eggprogressbar
byte-compiling buildbdist.win-amd64eggprogressbarcompat.py to compat.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbarprogressbar.py to progressbar.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbarwidgets.py to widgets.cpython-36.pyc
byte-compiling buildbdist.win-amd64eggprogressbar__init__.py to __init__.cpython-36.pyc
creating buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infoPKG-INFO -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infoSOURCES.txt -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infodependency_links.txt -> buildbdist.win-amd64eggEGG-INFO
copying progressbar.egg-infotop_level.txt -> buildbdist.win-amd64eggEGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'distprogressbar-2.3.dev0-py3.6.egg' and adding 'buildbdist.win-amd64egg' to it
removing 'buildbdist.win-amd64egg' (and everything under it)
Processing progressbar-2.3.dev0-py3.6.egg
Copying progressbar-2.3.dev0-py3.6.egg to c:programdataanaconda3libsite-packages
Adding progressbar 2.3.dev0 to easy-install.pth file
Installed c:programdataanaconda3libsite-packagesprogressbar-2.3.dev0-py3.6.egg
Processing dependencies for progressbar==2.3.dev0
Finished processing dependencies for progressbar==2.3.dev0
E:opensource_codesprogressbar-python3>python
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>>
conda install progressbar2
or maybe
pip install progressbar2
I had been facing the same issue when trying to implement the progressbar for a code. Above suggestion : conda install progressbar2
still holds good.
(base) PS C:Usersuser8> conda install progressbar2
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:ProgramDataAnaconda3
added / updated specs:
- progressbar2
The following packages will be downloaded:
package | build
---------------------------|-----------------
progressbar2-4.2.0 | py39haa95532_0 52 KB
python-utils-3.3.3 | py39haa95532_0 36 KB
------------------------------------------------------------
Total: 88 KB
The following NEW packages will be INSTALLED:
progressbar2 pkgs/main/win-64::progressbar2-4.2.0-py39haa95532_0 None
python-utils pkgs/main/win-64::python-utils-3.3.3-py39haa95532_0 None
Proceed ([y]/n)? y
Downloading and Extracting Packages
python-utils-3.3.3 | 36 KB | ############################################################################ | 100%
progressbar2-4.2.0 | 52 KB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
In case you IDE does not identify the installation, restart and retry. You may install this package in your Virtual environment separately in case you are using one.
The import in your program however, does not change. It still remains :
import progressbar