-
Hello, I am trying to build a PEX for Python 2.7. The reason is that I need to communicate with a service using RPyC, but RPyC is incompatible between Python 2 and 3. Some instances of the service still run on Python 2, so I need to build Python 2 and Python 3 versions of the client software. It would be very practical to build this client as a SCIE PEX to avoid dependency on two Python versions on target machines. Building scie PEX for Python 3.11 works fine, but if I switch to a Python 2.7 virtual environment (using pyenv), I get the following error on macOS:
Similarly on Linux:
Can someone, please, explain me this error message. Am I doing something wrong or is Python 2.7 not supported by scie PEX? Thank you very much for any advice and for working on this great project. Best regards Tomas Cerha |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
CPython 2.7 is not supported, although PyPy 2.7 is. These PEX scies are built using the science tool and it uses https://github.com/indygreg/python-build-standalone for portable CPython distributions and https://pypy.org/ (for PyPy). So the crux here is finding a portable CPython 2.7 distribution (a pre-built Python tarball that can be unpacked on any Linux or Mac machine and automatically work). There is none that I'm aware of. |
Beta Was this translation helpful? Give feedback.
If your project can run under PyPy, then using a pyenv pypy2.7 venv to build the PEX scie from should work.