New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 771310 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

lab-tools/setup_lab_tools fails to set up a virtualenv

Project Member Reported by djkurtz@chromium.org, Oct 3 2017

Issue description

Following instructions in [0] to install lab-tools (ie. dut-status) fails in lab-tools/setup_lab_tools
[0] https://sites.google.com/a/google.com/chromeos/for-team-members/infrastructure/lab-tools

$ lab-tools/setup_lab_tools
...

13:47:21 INFO | chmod -R a+rX '/usr/local/google/home/djkurtz/lab-tools/src/third_party/autotest/files/site-packages'
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 46, in <module>
    main()
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 35, in main
    print(venv.ensure())
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 100, in ensure
    self._check_or_create()
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 108, in _check_or_create
    self._create()
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 117, in _create
    logfile=logfile)
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 209, in _create_venv
    _log_check_call(command, logfile=logfile)
  File "/usr/local/google/home/djkurtz/lab-tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 254, in wrapped_command
    call_func(args, stdout=logfile, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
cros_venv.venvlib.VirtualenvMissingError: virtualenv is not installed (caused by [Errno 2] No such file or directory)
ERROR: Failed to set up a virtualenv.

....
Note, however, it appears that the "dut-status" tool has still been successfully built and installed.

....


ayatane, a quick search shows that CL [1] added this error message, so perhaps you can know where to look next.

[1] https://chromium-review.googlesource.com/692982
 
you need to install the virtualenv package in your host distro first:
  sudo apt-get install virtualenv

no idea where that should be added for devs though.  i've updated our quickstart/dev docs to include virtualenv in the apt-get install list.
On trusty

# sudo apt-get install virtualenv

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package virtualenv

Comment 3 by jkop@chromium.org, Oct 3 2017

The correct command is

# sudo apt-get install python-virtualenv
i have virtualenv and python-virtualenv packages available on my system.  maybe a distro version issue.  both docs should say python-virtualenv now.
Status: Fixed (was: Assigned)
Thanks, all.  "sudo apt-get install python-virtualenv" worked for me.
Can documentation be amended if it's not correct?
the public docs have been updated already

maybe the lab setup docs should also be updated, or some autotest/lab scripts should automatically install this

Comment 8 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 9 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment