Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute pex utility on Windows #259

Closed
johnthagen opened this issue May 18, 2016 · 3 comments
Closed

Unable to execute pex utility on Windows #259

johnthagen opened this issue May 18, 2016 · 3 comments
Labels

Comments

@johnthagen
Copy link
Contributor

johnthagen commented May 18, 2016

I don't see any mention of Windows in the docs, so perhaps pex simply doesn't support Windows, but I get the following errors when trying to do a simple install and run of pex on Windows 10.

>python -V
Python 3.5.1

>pip -V
pip 8.1.2 from c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages (python 3.5)

>pip install pex
Collecting pex
  Downloading pex-1.1.6-py2.py3-none-any.whl (99kB)
    100% |################################| 102kB 1.3MB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools<20.11,>=2.2 in c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\setuptools-20.10.1-py3.5.egg (from pex)
Installing collected packages: pex
Successfully installed pex-1.1.6

>pex
Traceback (most recent call last):
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\Scripts\pex.exe\__main__.py", line 9, in <module>
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\bin\pex.py", line 509, in main
    pex_builder = build_pex(reqs, options, resolver_options_builder)
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\bin\pex.py", line 444, in build_pex
    interpreter = interpreter_from_options(options)
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\bin\pex.py", line 437, in interpreter_from_options
    interpreter = resolve(interpreter, WHEEL_REQUIREMENT)
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\bin\pex.py", line 410, in resolve_interpreter
    installer_provider)
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\bin\pex.py", line 361, in _resolve_and_link_interpreter
    egg = EggPackage(os.path.realpath(target_link))
  File "c:\users\john hagen\appdata\local\programs\python\python35\lib\site-packages\pex\package.py", line 150, in __init__
    raise self.InvalidPackage('Not an egg: %s' % filename)
pex.package.InvalidPackage: Not an egg: wheel

I even tried using the --no-binary flag for pip, but it resulted in the same error:

C:\Users\User>pip install --no-binary :all: pex
Collecting pex
  Downloading pex-1.1.6.tar.gz (472kB)
    100% |################################| 481kB 1.6MB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools<20.11,>=2.2 in c:\python35\lib\site-packages (from pex)
Installing collected packages: pex
  Running setup.py install for pex ... done
Successfully installed pex-1.1.6

Before I went trying to investigate this too far, I wanted to check to see if Windows is really a supported platform to begin with.

@kwlzn
Copy link
Contributor

kwlzn commented May 18, 2016

pex does not currently claim windows support. however, there have been a handful of recent PRs from the Buck team that have moved the needle to the point that some folks are making this work with modifications - see: #230

ultimately, windows support is something that the primary developers of pex do not have a need for or interest in (we are all mostly UNIX shops). if a reliable owner can be established to implement and maintain this functionality tho (including setup of AppVeyor for CI on windows, etc), we'd be amenable to that. it just hasn't materialized yet.

@nfx
Copy link

nfx commented Apr 10, 2024

@kwlzn i've landed on this issue from different perspective - would linux-built .pex files run on windows?...

@jsirois
Copy link
Member

jsirois commented Apr 11, 2024

@nfx - almost certainly not. Known to not work is the file locking code Pex uses to keep its cache parallel-process safe. #1157 attempted to address this particular issue, but you might read there for more on where I stand with adding Windows support. In short, Pex does not support Windows and never has. PEXes have worked on Windows at various periods of time in the past, but by luck. Without green CI on a Windows machine I cannot in good faith support Windows Pex users. No one has had the time to get Pex working on Windows + CI setup to ensure no backslide as of yet. I did put in alot of work around a year ago but never completed. I am picking that work back up presently, but its likely to take a while - I only work on this part time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants