Hi Lukáš, Frustrating, I haven't solve the problem.
Formerly, I installed the avocado and avocado_vt, and then use them. I hadn't met any problem. Now,I want to run it from source code on an new PC(fedora20), without installing. I think It's more flexible for development. I deploy it as following, 1.Clone both avocado and avocado_vt to the same directory. [root@localhost avocado-devel]# ls avocado avocado-vt 2.Run 'pip install -r requirements' for both of them. I'm sure the requirements have been updated to the latest version. But there're some warning, [root@localhost avocado]# pip install -r requirements.txt Ignoring stevedore: markers u"python_version < '2.7'" don't match your environment Ignoring argparse: markers u"python_version < '2.7'" don't match your environment Ignoring logutils: markers u"python_version < '2.7'" don't match your environment Ignoring importlib: markers u"python_version < '2.7'" don't match your environment Ignoring unittest2: markers u"python_version < '2.7'" don't match your environment Requirement already satisfied (use --upgrade to upgrade): fabric>=1.7.0 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.11 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): libvirt-python>=1.2.9 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): pyliblzma>=0.5.3 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 9)) Requirement already satisfied (use --upgrade to upgrade): pystache>=0.5.3 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 11)) Requirement already satisfied (use --upgrade to upgrade): requests>=1.2.3 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 13)) Requirement already satisfied (use --upgrade to upgrade): stevedore>=1.8.0 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): paramiko<2.0,>=1.10 in /usr/lib/python2.7/site-packages (from fabric>=1.7.0->-r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /usr/lib/python2.7/site-packages (from stevedore>=1.8.0->-r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/lib/python2.7/site-packages (from stevedore>=1.8.0->-r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.11 in /usr/lib/python2.7/site-packages (from paramiko<2.0,>=1.10->fabric>=1.7.0->-r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): pycrypto! =2.4,>=2.1 in /usr/lib64/python2.7/site-packages (from paramiko<2.0,>=1.10->fabric>=1.7.0->-r requirements.txt (line 3)) [root@localhost avocado-vt]# pip install -r requirements.txt Requirement already satisfied (use --upgrade to upgrade): autotest>=0.16.2 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): aexpect>=1.0.0 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): simplejson>=3.5.3 in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 3)) 3. Run 'make link' on avocado directory. 4. And then, I want to confirm whether avocado can load the avocado_vt plugin, so I run 'scripts/avocado plugins' on avocado-devel/avocado directory. the following error appeared. #scripts/avocado plugins <---------------cut----------> Failed to load plugin from module "avocado_vt.plugins.vt_list": IOError(2, 'No such file or directory') Failed to load plugin from module "avocado_vt.plugins.vt": IOError(2, 'No such file or directory') <---------------cut----------> *It should be noted that the plugin "vt_bootstrap" has been load successfully. *In fact, vt_list/vt/vt_bootstrap, all of them are placed at the same directory. I traced it and found it occurred at class EntryPoint.resolve(), which is declared at /usr/lib/python2.7/site-packages/pkg_resources/__init__.py The call of __import__ failed for both vt_list plugin and vt plugin. I added trace log, and then run 'scripts/avocado plugins' again. def resolve(self): """ Resolve the entry point from its module and attrs. """ print "trace import.... ", self.module_name module = __import__(self.module_name, fromlist=['__name__'], level=0) try: return functools.reduce(getattr, self.attrs, module) except AttributeError as exc: raise ImportError(str(exc)) The output : trace import.... avocado_vt.plugins.vt_list vt-list = avocado_vt.plugins.vt_list:VTLister trace import.... avocado_vt.plugins.vt vt = avocado_vt.plugins.vt:VTRun [(EntryPoint.parse('vt-list = avocado_vt.plugins.vt_list:VTLister'), IOError(2, 'No such file or directory')), (EntryPoint.parse('vt = avocado_vt.plugins.vt:VTRun'), IOError(2, 'No such file or directory'))] >From the above description, do you have another hints to me ? Thanks, wei On Mon, 2016-04-18 at 17:45 +0200, Lukáš Doktor wrote: > Hello Wei, > > Dne 18.4.2016 v 11:06 Wei, Jiangang napsal(a): > > On Mon, 2016-03-07 at 09:55 +0100, Lukáš Doktor wrote: > >> Hello guys, > >> > >> thank you for great answers, in deed we forgot to put source code > >> install section in > >> http://avocado-vt.readthedocs.org/en/latest/GetStartedGuide.html I added > >> it to our TODO list. > >> > >> We do provide some convenience methods to simplify running from sources: > >> > >> 0. Install non-python dependencies listed in documentation > >> 1. From one directory clone avocado and avocado-vt (so the result of `ls > >> $TARGET_DIR` are 2 files: `avocado` and `avocado-vt`). > >> 2. Install python dependencies by `make requirements` (optionally `make > >> requirements-selftests`) in both directories > avocado-vt does not support `make requirements`, so one have to run `pip > install -r requirements.txt` there. > >> 3. In `$TARGET_DIR/avocado` run `make link` which walks the `../*` > >> directories and registers the avocado plugins for this user. > >> > >> You only need to do this once, then you can modify the code and it'll > >> still run the latest version (it creates something-like-symlinks to the > >> sources for this user). You need to run the `make link` when new targets > >> are added, but this only happens once in a while (eg. new plugin is added) > >> > >> Alternatively you can always install it system-wide by `make install` in > >> each directory, but that install the current version so you need to > >> re-install it each time you change the sources. > > > > Dear all. > > Hi lukas, > > > > I try to run Avocado+Avocado-vt from sources according the above steps. > > But I met some problems. > > > > [root@localhost avocado]# scripts/avocado plugins > > Failed to load plugin from module "avocado_vt.plugins.vt_list": > > IOError(2, 'No such file or directory') > > Failed to load plugin from module "avocado_vt.plugins.vt": IOError(2, > > 'No such file or directory') > I hate IOError... I'm wondering if you could catch this exception and > print the `IOError.filename`, that might help... > > Plugins that add new commands (avocado.plugins.cli.cmd): > > vt-bootstrap Avocado VT - implements the 'vt-bootstrap' subcommand > > distro Shows detected Linux distribution > > sysinfo Collect system information > > plugins Displays plugin information > > multiplex Generate a list of dictionaries with params from a > > multiplex file > > <--------------------------------------cut-------------------------------> > > > > I'm sure of that all requirements have been updated. > > > > [root@localhost avocado]# pip install -r requirements.txt > > Requirement already satisfied (use --upgrade to upgrade): fabric>=1.7.0 > > in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line > > 3)) > > Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.11 > > in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line > > 5)) > > Requirement already satisfied (use --upgrade to upgrade): > > libvirt-python>=1.2.9 in /usr/lib64/python2.7/site-packages (from -r > > requirements.txt (line 7)) > > Requirement already satisfied (use --upgrade to upgrade): > > pyliblzma>=0.5.3 in /usr/lib64/python2.7/site-packages (from -r > > requirements.txt (line 9)) > > Requirement already satisfied (use --upgrade to upgrade): > > pystache>=0.5.3 in /usr/lib/python2.7/site-packages (from -r > > requirements.txt (line 11)) > > Requirement already satisfied (use --upgrade to upgrade): > > requests>=1.2.3 in /usr/lib/python2.7/site-packages (from -r > > requirements.txt (line 13)) > > Requirement already satisfied (use --upgrade to upgrade): > > stevedore>=1.8.0 in /usr/lib/python2.7/site-packages (from -r > > requirements.txt (line 15)) > > Requirement already satisfied (use --upgrade to upgrade): > > paramiko<2.0,>=1.10 in /usr/lib/python2.7/site-packages (from > > fabric>=1.7.0->-r requirements.txt (line 3)) > > Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 > > in /usr/lib/python2.7/site-packages (from stevedore>=1.8.0->-r > > requirements.txt (line 15)) > > Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 > > in /usr/lib/python2.7/site-packages (from stevedore>=1.8.0->-r > > requirements.txt (line 15)) > > Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.11 > > in /usr/lib/python2.7/site-packages (from > > paramiko<2.0,>=1.10->fabric>=1.7.0->-r requirements.txt (line 3)) > > Requirement already satisfied (use --upgrade to upgrade): pycrypto! > > =2.4,>=2.1 in /usr/lib64/python2.7/site-packages (from > > paramiko<2.0,>=1.10->fabric>=1.7.0->-r requirements.txt (line 3)) > > > Did you executed this in each directory (avocado, avocado-vt)? > Avocado-vt has additional dependencies. > > (note to myself, let's improve the `make requirements` to walk all > sub-directories the same way `make link` works > https://trello.com/c/pQXj8AUo/651-rfc-walk-subdirectories-in-make-requirements > > ) > > > > > And I did some investigates, > > It seems that stevedore.ExtensionManager.__init__ failes and throw the > > above error messages. > > > > avocado/core/dispatcher.py-------------------------------------- > > > > class Dispatcher(ExtensionManager): > > > > """ > > Base dispatcher for various extension types > > """ > > > > def __init__(self, namespace): > > self.load_failures = [] > > super(Dispatcher, self).__init__(namespace=namespace, > > invoke_on_load=True, > > > > on_load_failure_callback=self.store_load_failure, > > propagate_map_exceptions=True) > > > > -------------------------------------------------------------------------------- > > > > > > I noticed that stevedore was introduced as New Plugin Architecture from > > the commit logs. > > But I'm not familiar with stevedore , > > and there's no other help doc for running Avocado from source codes. > > so May i trouble you to give me a hand? How can I fix it? > > > > PS, > > There's a discuss launched by rbian. > > https://github.com/avocado-framework/avocado-vt/issues/308 > > > > And Imr said "now in order for the plugins to work they must be > > installed", > > is it true? > > > Not at all. The Stevedore was used as it's a standard way of loading > plugins so it should simplify things. > > As mentioned in this discussion, you can either install it by `make > install`, or you can follow the steps 0-3, which results in `make link`. > The `make link` executes `python setup.py develop --user` (or without > the `--user` on python 2.6) which creates egg links for `avocado` to > this location (for this user). > > Unfortunately I still haven't updated the documentation, but it's near > the top of the TODO list > https://trello.com/c/LdXWhQ2Z/641-add-documentation-of-make-link-target, > so please use the description from this email. > > Note that rbian mentioned some stevedore libraries contain failures. I > tried several versions from pip and they worked well, so I can't tell > exactly. You might try `pip install --upgrade stevedore`, maybe it > solves your problem. > > > > > Thanks in advance. > I'm not sure this helped, but hopefully we'll get you avocado-vt up and > running soon. If the above did not help, would you please share the > commands you executed so I could get a better view of what was going on? > Kind regards, > Lukáš > > >> > >> Kind regards, > >> Lukáš > >> > >> > >> PS: See one more recommendation bellow. > >> > >> Dne 3.3.2016 v 09:43 Zhu Yijun napsal(a): > >>> yes, now it works! Thanks very much! > >>> > >>> On 2016/3/3 14:33, Yanbing Du wrote: > >>> > >>>> > >>>> > >>>> On 03/03/2016 02:11 PM, Zhu Yijun wrote: > >>>>> Hi Yanbing, > >>>>> > >>>>> Thanks for you reply. > >>>>> > >>>>> On 2016/3/3 13:20, Yanbing Du wrote: > >>>>> > >>>>>> > >>>>>> > >>>>>> On 03/03/2016 12:49 PM, Zhu Yijun wrote: > >>>>>>> Hi all, > >>>>>>> > >>>>>>> I am trying to setup the avocado and avocado-vt tools. > >>>>>>> > >>>>>>> I have to install them by git repository because some > >>>>>>> special results. Until now I have installed avocado guided by docs as > >>>>>>> below: > >>>>>>> > >>>>>>> > >>>>>>> http://avocado-framework.readthedocs.org/en/latest/GetStartedGuide.html > >>>>>>> > >>>>>>> And avocado has been run successfully. However, for > >>>>>>> avocado-vt, the only way to install it is by "yum install > >>>>>>> avocado-plugins". > >>>>>>> > >>>>>>> So is there some method to install by sources code? > >>>>>> > >>>>>> Yes, just like avocado, you can install avocado-vt by: > >>>>>> > >>>>>> #python setup.py --quiet install > >> > >> For development `--user` is strongly recommended. It creates egg-links > >> to those libraries only for this user. > >> > >>>>>> > >>>>> > >>>>> > >>>>> After run it, it still report error when I run avocado. > >>>>> > >>>>> Failed to load plugin from module "avocado_vt.plugins.vt_list": > >>>>> ImportError('No module named aexpect',) > >>>>> Failed to load plugin from module "avocado_vt.plugins.vt": > >>>>> ImportError('No module named aexpect',) > >>>> > >>>> Make sure you install all these required pkgs, for both avocado and > >>>> avocado-vt: > >>>> #pip install -r requirements.txt --upgrade > >>>> > >>> > >>>>> > >>>>>>> > >>>>>>> Additionally, I try to run "make link" in avocado-vt > >>>>>>> directory, then run "avocado plugins", it seems like vt & vt_list not > >>>>>>> installed. > >>>>>>> > >>>>>>> The message as follow: > >>>>>>> > >>>>>>> Failed to load plugin from module > >>>>>>> "avocado_vt.plugins.vt_list": ImportError('No module named aexpect',) > >>>>>>> Failed to load plugin from module "avocado_vt.plugins.vt": > >>>>>>> ImportEr > >>>>>>> Plugins that add new commands (avocado.plugins.cli.cmd): > >>>>>>> vt-bootstrap Avocado VT - implements the 'vt-bootstrap' > >>>>>>> subcommand > >>>>>>> exec-path Returns path to avocado bash libraries and exits. > >>>>>>> run Run one or more tests (native test, test alias, > >>>>>>> binary > >>>>>>> sysinfo Collect system information > >>>>>>> list List available tests > >>>>>>> multiplex Generate a list of dictionaries with params from > >>>>>>> a mul > >>>>>>> plugins Displays plugin information > >>>>>>> config Shows avocado config keys > >>>>>>> distro Shows detected Linux distribution > >>>>>>> Plugins that add new options to commands (avocado.plugins.cli): > >>>>>>> journal Journal options for the 'run' subcommand > >>>>>>> remote Remote machine options for 'run' subcommand > >>>>>>> json JSON output options for 'run' command > >>>>>>> html HTML job report options for 'run' subcommand > >>>>>>> wrapper Implements the '--wrapper' flag for the 'run' > >>>>>>> subcommand > >>>>>>> vm Virtual Machine options for 'run' subcommand > >>>>>>> gdb GDB options for the 'run' subcommand > >>>>>>> replay Replay options for 'run' subcommand > >>>>>>> xunit xUnit output options > >>>>>>> > >>>>>>> Does anyone can give me some advices, thanks in advance! > >>>>>>> > >>>>>>> Zhu Yijun > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Avocado-devel mailing list > >>>>>>> Avocado-devel@redhat.com > >>>>>>> https://www.redhat.com/mailman/listinfo/avocado-devel > >>>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> > >>>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> Avocado-devel mailing list > >>> Avocado-devel@redhat.com > >>> https://www.redhat.com/mailman/listinfo/avocado-devel > >>> > >> > >> _______________________________________________ > >> Avocado-devel mailing list > >> Avocado-devel@redhat.com > >> https://www.redhat.com/mailman/listinfo/avocado-devel > >> > >> > > > > > > > > _______________________________________________ > Avocado-devel mailing list > Avocado-devel@redhat.com > https://www.redhat.com/mailman/listinfo/avocado-devel > > _______________________________________________ Avocado-devel mailing list Avocado-devel@redhat.com https://www.redhat.com/mailman/listinfo/avocado-devel