pex: bootstrap errors

I recently started getting errors as part of the pex bootstrap at runtime. This was previously a working build, but a recent clean build of the virtualenv broke and I’m not sure what happened.

$ pip list | grep setuptools
setuptools                   40.8.0
$ pex --version
pex 1.5.3
$ pex . -m example --platform=macosx-10.13-x86_64 -o build/example
$ ./build/example --version
Traceback (most recent call last):
  File ".bootstrap/_pex/pex.py", line 349, in execute
    exit_code = self._wrap_coverage(self._wrap_profiling, self._execute)
  File ".bootstrap/_pex/pex.py", line 281, in _wrap_coverage
    return runner(*args)
  File ".bootstrap/_pex/pex.py", line 312, in _wrap_profiling
    return runner(*args)
  File ".bootstrap/_pex/pex.py", line 394, in _execute
    return self.execute_entry(self._pex_info.entry_point)
  File ".bootstrap/_pex/pex.py", line 506, in execute_entry
    return runner(entry_point)
  File ".bootstrap/_pex/pex.py", line 510, in execute_module
    cls.demote_bootstrap()
  File ".bootstrap/_pex/pex.py", line 412, in demote_bootstrap
    bootstrap_path_index = sys.path.index(bootstrap_path)
ValueError: '<redacted>/build/example/.bootstrap' is not in list

Because I was using a slightly older version, I upgraded to 1.6.1 and got a new but similar error:

$ pex --version
pex 1.6.1
$ pex . -m example --platform=macosx-10.13-x86_64 -o build/example
$ ./build/example --version
Traceback (most recent call last):
  File ".bootstrap/pex/pex.py", line 352, in execute
  File ".bootstrap/pex/pex.py", line 284, in _wrap_coverage
  File ".bootstrap/pex/pex.py", line 315, in _wrap_profiling
  File ".bootstrap/pex/pex.py", line 397, in _execute
  File ".bootstrap/pex/pex.py", line 495, in execute_entry
  File ".bootstrap/pex/pex.py", line 499, in execute_module
  File ".bootstrap/pex/pex.py", line 416, in demote_bootstrap
  File ".bootstrap/pex/third_party/__init__.py", line 343, in uninstall
  File ".bootstrap/pex/third_party/__init__.py", line 257, in uninstall_all
  File ".bootstrap/pex/third_party/__init__.py", line 271, in uninstall
  File ".bootstrap/pex/third_party/__init__.py", line 21, in _tracer
ImportError: No module named pex.tracer

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Yay! OK, well, there may be a need to address the case where the pex is housed under a sitecustimize dir, but for now I’ll call this victory and close as answered.