Has anyone ever had problems running a pex when yo...
# general
p
Has anyone ever had problems running a pex when your PEX_PYTHON_PATH points to a pyenv virtualenv?
I see
Copy code
File "job-scheduler.pex/.bootstrap/pex/bootstrap.py", line 68, in imported_from_bootstrap
  File "//home/ubuntu/.pyenv/versions/2.7.14/lib/python2.7/email/__init__.py", line 79, in __getattr__
    __import__(self.__name__)
  File "/home/ubuntu/.pyenv/versions/2.7.14/envs/pants_1_16/lib/python2.7/site-packages/_virtualenv.py", line 112, in find_module
    if fullname in _DISTUTILS_PATCH:
TypeError: argument of type 'NoneType' is not iterable
I added a println to that virtualenv file, something is unsetting
_DISTUTILS_PATCH
e
What version of Pex are you using? 2.1.22 added support for virtualenv detection that should avoid issues like this: https://github.com/pantsbuild/pex/releases/tag/v2.1.22
p
2.1.9 😞
can i upgrade pex without upgrading pants?
e
I'm AFK but it's unlikely. What version of Pants? I can dig a bit this afternoon.
p
1.27
Copy code
ERROR: Cannot install pantsbuild-pants==1.27.0 and pex==2.1.22 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pex==2.1.22
    pantsbuild-pants 1.27.0 depends on pex==2.1.9
e
I backported Pex 2.1.24 to Pants 1.30.x if you are in a position to upgrade Pants.
p
haha just upgraded to 27 and that broke this so not in the mood to upgrade again 😛
if i wanted to backport to 27, what would i need to do?
e
You'd be doing your own private release of Pants 1st off. We don't support older than 1.30.x with backports. Assuming you're willing to do that, you'd probably best start by looking at the 1.30.x backport PR here: https://github.com/pantsbuild/pants/commit/4ea3a2ed14c49e0b80180f9d883674f89392a8f3
I think your change wouldn't be substantially different from that one. I'd be happy to code review / answer questions that come up.
p
let me see what i can do. kinda burnt out from upgrading to 1.27 tbh
e
I'm guessing the upgrade from 1.27 -> 1.30 is easier than the backport and manual release, but I can understand the burnout.
p
i think it might be easier for me to tell people to not use pyenv virtualenvs… which seems like an env within an env
and upgrade to 1.30 in the future
e
SGTM