tito icon indicating copy to clipboard operation
tito copied to clipboard

ImportError: No module named bugzilla.rhbugzilla

Open nilesh-shah opened this issue 10 years ago • 7 comments

Hi,

I want to install Subscription manager, the UI component of the CandlePin. I was referring this link https://fedorahosted.org/subscription-manager/wiki/Building

I am stuck at Tito installation here. I went to Titl Git, cloned the source and was trying to build tito. I followed following steps

git clone https://github.com/dgoodwin/tito.git
cd tito/
sudo yum install python-setuptools
./setup.py build
sudo ./setup.py install

The steps are successful, it did not return any error. However, when I try running any Tito command I get following error. See complete stack trace also

Traceback (most recent call last):
  File "/usr/bin/tito", line 5, in <module>
    pkg_resources.run_script('tito==0.5.5', 'tito')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/tito-0.5.5-py2.6.egg/EGG-INFO/scripts/tito", line 19, in <module>
    from tito.cli import CLI
  File "/usr/lib/python2.6/site-packages/tito-0.5.5-py2.6.egg/tito/cli.py", line 23, in <module>
    from tito.common import *
  File "/usr/lib/python2.6/site-packages/tito-0.5.5-py2.6.egg/tito/common.py", line 22, in <module>
    from bugzilla.rhbugzilla import RHBugzilla
ImportError: No module named bugzilla.rhbugzilla

I am not finding a solution, can someone please help me resolve this?

OR Let me know if there is another way of building subscription manager.

Thanks

nilesh-shah avatar Sep 29 '14 06:09 nilesh-shah

$ yum whatprovides */rhbugzilla.py
... SNIP
python-bugzilla-0.9.0-2.fc20.noarch : A python library for interacting with Bugzilla
Repo        : fedora
Matched from:
Filename    : /usr/lib/python2.7/site-packages/bugzilla/rhbugzilla.py

BTW: Tito is part of Fedora and EPEL, so you can install it using yum install tito from your distribution. And even if you want to build development version, then prefered way is to install tito from distribution and then build tito using tito: tito build --test --rpm -i

xsuchy avatar Sep 29 '14 06:09 xsuchy

@xsuchy Thanks for the update. But I am not able to run yum install tito successfully. When I run the command, it says that "This system is receiving updates from RHN Classic or RHN Satellite. No package Tito available"

I am not very well exposed to Linux but really would like to make this working. Do you have any further suggestion on this?

Thanks

nilesh-shah avatar Sep 29 '14 07:09 nilesh-shah

It seems that you are using RHEL. In this case you need to enable EPEL repository. See: https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F

xsuchy avatar Sep 29 '14 07:09 xsuchy

@xsuchy Thanks, will try this.

Just wanted to check if I can enable EPEL repo and can download Tito package, I have also built development version source code. Any possibilities of conflict? If yes, what is the best way to resolve it.

Thanks

nilesh-shah avatar Sep 29 '14 08:09 nilesh-shah

You will need to manually remove whatever setup.py installed, try this step with the --record option to see what it did.

http://stackoverflow.com/questions/1550226/python-setup-py-uninstall

Also note that if you are using RHEL, subscription-manager is quite possibly already installed. If not we publish pre-built community use rpms here: https://repos.fedorapeople.org/repos/candlepin/

dgoodwin avatar Sep 29 '14 12:09 dgoodwin

I was able to get past the issue by directly cloning the python-bugzilla into a local repo and add it to PYTHON PATH.

git clone https://github.com/beekhof/python-bugzilla.git export PYTHONPATH:$PYTHONPATH:python-bugzilla/ tito init --> works.

bdastur avatar Dec 11 '14 00:12 bdastur

Also, can this requirement be added to the README file.

bdastur avatar Dec 11 '14 00:12 bdastur