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

Running OAISYS for the first time - ModuleNotFoundError: No module named 'progressbar' #13

Open
Fortranibal opened this issue Feb 6, 2024 · 0 comments

Comments

@Fortranibal
Copy link

Fortranibal commented Feb 6, 2024

When running OAISYS for the first time and after cloning the git repository, following the provided tutorial, I have encountered several issues I will describe. The second issue can be found here #14. Here is the first one:

Issue 1:

In my case, the example command: python run_oaisys.py --blender-install-path /path/to/blender/
becomes: sudo python3 ./run_oaisys.py --blender-install-path ../../blender

Which is followed by the following output:

Progressbar for downloading, can only be shown, when the python package "progressbar" is installed

Traceback (most recent call last):
  File "/home/semesterarbeit/oaisys/./run_oaisys.py", line 103, in <module>
    import progressbar
ModuleNotFoundError: No module named 'progressbar'

Solution:

pip install progressbar does NOT solve this problem.

However, to import the module, the solution I have found is to run the following commands:

  1. sudo git clone https://github.com/coagulant/progressbar-python3.git
    Which produces the following output:
Cloning into 'progressbar-python3'...
remote: Enumerating objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Receiving objects: 100% (30/30), 17.29 KiB | 1.33 MiB/s, done.
Resolving deltas: 100% (7/7), done.
  1. Access the folder in which you have downloaded the progressbar module and locate the setup.py file. There, run sudo python3 setup.py install
    If done correctly, the following should be output:
/usr/lib/python3/dist-packages/setuptools/dist.py:493: UserWarning: Normalizing '2.3dev' to '2.3.dev0'
  warnings.warn(tmpl.format(**locals()))
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
  warnings.warn(
running bdist_egg
running egg_info
creating progressbar.egg-info
writing progressbar.egg-info/PKG-INFO
writing dependency_links to progressbar.egg-info/dependency_links.txt
writing top-level names to progressbar.egg-info/top_level.txt
writing manifest file 'progressbar.egg-info/SOURCES.txt'
reading manifest file 'progressbar.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'progressbar.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/progressbar
copying progressbar/compat.py -> build/lib/progressbar
copying progressbar/progressbar.py -> build/lib/progressbar
copying progressbar/widgets.py -> build/lib/progressbar
copying progressbar/__init__.py -> build/lib/progressbar
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/progressbar
copying build/lib/progressbar/compat.py -> build/bdist.linux-x86_64/egg/progressbar
copying build/lib/progressbar/progressbar.py -> build/bdist.linux-x86_64/egg/progressbar
copying build/lib/progressbar/widgets.py -> build/bdist.linux-x86_64/egg/progressbar
copying build/lib/progressbar/__init__.py -> build/bdist.linux-x86_64/egg/progressbar
byte-compiling build/bdist.linux-x86_64/egg/progressbar/compat.py to compat.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/progressbar/progressbar.py to progressbar.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/progressbar/widgets.py to widgets.cpython-310.pyc
byte-compiling build/bdist.linux-x86_64/egg/progressbar/__init__.py to __init__.cpython-310.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying progressbar.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying progressbar.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying progressbar.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying progressbar.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/progressbar-2.3.dev0-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing progressbar-2.3.dev0-py3.10.egg
Copying progressbar-2.3.dev0-py3.10.egg to /usr/local/lib/python3.10/dist-packages
Adding progressbar 2.3.dev0 to easy-install.pth file

Installed /usr/local/lib/python3.10/dist-packages/progressbar-2.3.dev0-py3.10.egg
Processing dependencies for progressbar==2.3.dev0
Finished processing dependencies for progressbar==2.3.dev0
  1. Edit the run_oaisys.py file and include import progressbar towards the top, before the package is called.

That should fix the issue, but would be nice to see a way in which progressbar is correctly fetched directly by cloning the repository.

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

No branches or pull requests

1 participant