ほわいとぼーど

ぷろぐらまのメモ帳

lambda-uploader (VirtualBox shared folder on Windows)で「Exception: virtualenv returned unsuccessfully」

Windows10上で、Docker Toolboxでlambda-uploader(virtualenv)を動かしたらエラーが出たので調べたメモ。

$lambda-uploader --no-upload -VV
中略

DEBUG:lambda_uploader.package:Virtualenv stderr: Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 708, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 921, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 1353, in install_python
    os.symlink(py_executable_base, full_pth)
OSError: [Errno 71] Protocol error

 Unexpected error. Please report this traceback.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/shell.py", line 172, in main
    _execute(args)
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/shell.py", line 73, in _execute
    venv, cfg.ignore, extra_files)
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/package.py", line 47, in build_package
    pkg.build(ignore)
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/package.py", line 68, in build
    self.install_dependencies()
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/package.py", line 138, in install_dependencies
    self._build_new_virtualenv()
  File "/usr/local/lib/python2.7/site-packages/lambda_uploader/package.py", line 171, in _build_new_virtualenv
    raise Exception('virtualenv returned unsuccessfully')
Exception: virtualenv returned unsuccessfully

こんな感じのエラーが出るわけだが、ずばり以下の記事のとおりだった。
「vagrant環境でtoxしたらハマった件」

VirtualBoxのshared folderの問題で、
VagrantでもDocker Toolboxでも起きたし、
試しにshared folderではない別の場所にコピーして実行したら問題なく動いた。