kolibri
kolibri copied to clipboard
upgrade pex to latest version would break kolibri
Observed behavior
In #5685, I tried to upgrade pex to latest version 1.6.7. The pex file was built successfully. However, when I run python kolibri.pex start
, I got the error that stopped me from starting kolibri.
My guess is that pex now vendors setuptools and wheel, and thus somehow pkg_resources
cannot be imported from <pex_location>/.bootstrap
.
If we run pip install kolibri.whl
, pkg_resources
can be imported from the local setuptools
library, since setuptools is usually installed with pip.
Expected behavior
kolibri pex should be run successfully
User-facing consequences
users cannot use pex file to run kolibri if we upgrade pex to latest version 1.6.7
Errors and logs
paths in the error log have been simplified for easier reading.
Traceback (most recent call last):
File "kolibri.pex/.bootstrap/pex/pex.py", line 352, in execute
File "kolibri.pex/.bootstrap/pex/pex.py", line 284, in _wrap_coverage
File "kolibri.pex/.bootstrap/pex/pex.py", line 315, in _wrap_profiling
File "kolibri.pex/.bootstrap/pex/pex.py", line 397, in _execute
File "kolibri.pex/.bootstrap/pex/pex.py", line 495, in execute_entry
File "kolibri.pex/.bootstrap/pex/pex.py", line 502, in execute_module
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 182, in run_module
mod_name, loader, code, fname = _get_module_details(mod_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 111, in _get_module_details
__import__(mod_name) # Do not catch exceptions initializing package
File "kolibri/__init__.py", line 11, in <module>
from .utils.version import get_version
File "kolibri/utils/version.py", line 106, in <module>
from .compat import parse_version
File "kolibri/utils/compat.py", line 10, in <module>
from pkg_resources import parse_version as _parse_version
ImportError: No module named pkg_resources
Steps to reproduce
get the pex from the PR linked in the description and run it.