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

Wheel version matching differs from pip #229

Closed
ghost opened this issue Apr 7, 2016 · 6 comments
Closed

Wheel version matching differs from pip #229

ghost opened this issue Apr 7, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2016

Box:abc burr0ws$ python
>>> import distutils.util
>>> distutils.util.get_platform()
'macosx-10.10-x86_64'
>>> import platform
>>> platform.mac_ver()
('10.10.5', ('', '', ''), 'x86_64')
>>> exit()
Box:abc burr0ws$ pex --version
pex 1.1.4

Try installing simplejson-3.8-2 wheel from pypi.

Box:abc burr0ws$ pex -o asdf.pex https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl#md5=e494f1df2cd3b7e639d530d6cf59826c
Traceback (most recent call last):
  File "/usr/local/bin/pex", line 9, in <module>
    load_entry_point('pex==1.1.4', 'console_scripts', 'pex')()
  File "build/bdist.macosx-10.10-x86_64/egg/pex/bin/pex.py", line 509, in main
  File "build/bdist.macosx-10.10-x86_64/egg/pex/bin/pex.py", line 471, in build_pex
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 200, in resolve
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 257, in build
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 168, in build
pex.resolver.Untranslateable: Package WheelPackage('file:///Users/burr0ws/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)

Change the version number in the platform tag.

Box:abc burr0ws$ wget https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl#md5=e494f1df2cd3b7e639d530d6cf59826c
--2016-04-07 17:48:51--  https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl
Resolving pypi.python.org... 199.27.76.223
Connecting to pypi.python.org|199.27.76.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 67450 (66K) [application/octet-stream]
Saving to: 'simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl'

simplejson-3.8.2-cp 100%[===================>]  65.87K  --.-KB/s    in 0.03s   

2016-04-07 17:48:51 (2.45 MB/s) - 'simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl' saved [67450/67450]

Box:abc burr0ws$ mv simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl simplejson-3.8.2-cp27-cp27m-macosx_10_6_x86_64.whl 
Box:abc burr0ws$ pex -o asdf.pex simplejson-3.8.2-cp27-cp27m-macosx_10_6_x86_64.whl
Box:abc burr0ws$ echo $?
0

Pip installs the package as is.

Box:abc burr0ws$ pip install https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl#md5=e494f1df2cd3b7e639d530d6cf59826c
Collecting simplejson==3.8.2 from https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl#md5=e494f1df2cd3b7e639d530d6cf59826c
  Using cached simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl
Installing collected packages: simplejson
  Found existing installation: simplejson 3.8.0
    Uninstalling simplejson-3.8.0:
      Successfully uninstalled simplejson-3.8.0
Successfully installed simplejson-3.8.2
You are using pip version 8.0.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Related, pip #PR #3232

@ewang
Copy link
Contributor

ewang commented Apr 7, 2016

@burrows-labs Oddly it worked fine for me; OSX 10.11.4, cp2.7.10, pex 1.1.4

(dev)Erics-MacBook-Air:workspace ericwang$ pex -vvvvv https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl
pex: Constructed RequestsContext context <pex.http.RequestsContext object at 0x10724c250>                            
pex: Building pex :: Resolving distributions :: Fetching file:///Users/ericwang/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl :: Fetcpex: Building pex :: Resolving distributions :: Translating /private/var/folders/lm/mknz0lm54jxc8sf76q_j27nc0000gn/T/tmpHxca0o/simplejson-3.8.2-cp27-  simplejson 3.8.2x86_64.whl into distribution                                           
pex: Building pex: 54.4ms                                                                                                                                                                          
pex:   Resolving interpreter: 0.9ms
pex:     Setting up interpreter /Users/ericwang/workspace/py_envs/dev/bin/python: 0.8ms
pex:   Resolving distributions: 15.7ms
pex:     Fetching file:///Users/ericwang/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl: 2.6ms
pex:       Fetching file:///Users/ericwang/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl: 1.8ms
pex:     Translating /private/var/folders/lm/mknz0lm54jxc8sf76q_j27nc0000gn/T/tmpHxca0o/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl into distribution: 3.3ms
Running PEX file at /var/folders/lm/mknz0lm54jxc8sf76q_j27nc0000gn/T/tmpiJRHzV with args []
pex: PEX.run invoking /Users/ericwang/workspace/py_envs/dev/bin/python /var/folders/lm/mknz0lm54jxc8sf76q_j27nc0000gn/T/tmpiJRHzV
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 

@ghost
Copy link
Author

ghost commented Apr 7, 2016

I was using OS X 10.10.5/cp2.7.11/pex1.1.4

@ewang
Copy link
Contributor

ewang commented Apr 7, 2016

From the pip PR, looks like you built a custom version of python. Do you have this same issue if you use the cpython included with OSX 10.10.5?

@ghost
Copy link
Author

ghost commented Apr 7, 2016

Using /usr/bin/python.

Box:pex burr0ws$ pex --python=/usr/bin/python -vvvvv https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl
pex: Building pex :: Resolving interpreter :: Setting up interpreter /usr/bin/ppex: Building pex :: Resolving distributions                                   pex: Constructed RequestsContext context <pex.http.RequestsContext object at 0x103ce6790>
pex: Building pex :: Resolving distributions :: Fetching file:///Users/burr0ws/pex: Building pex :: Resolving distributions :: Fetching file:///Users/burr0ws/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl :: Fetching file:pex: Building pex :: Resolving distributions :: Translating /private/var/folders/ph/ccypy1wd3px4r00xh39287vm0000gr/T/tmpQASY5Q/simplejson-3.8.2-cp27-cp27m-macTraceback (most recent call last):ion                                         
  File "/usr/local/bin/pex", line 9, in <module>
    load_entry_point('pex==1.1.4', 'console_scripts', 'pex')()
  File "build/bdist.macosx-10.10-x86_64/egg/pex/bin/pex.py", line 509, in main
  File "build/bdist.macosx-10.10-x86_64/egg/pex/bin/pex.py", line 471, in build_pex
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 200, in resolve
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 257, in build
  File "build/bdist.macosx-10.10-x86_64/egg/pex/resolver.py", line 168, in build
pex.resolver.Untranslateable: Package WheelPackage('file:///Users/burr0ws/.pex/build/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)
Box:pex burr0ws$ 

@ghost
Copy link
Author

ghost commented Apr 8, 2016

Tried running the command on OS X 10.11 and it worked fine.

@kwlzn
Copy link
Contributor

kwlzn commented Apr 7, 2017

no longer able to repro with current pex version (which forces a modern setuptools):

[omerta ~]$ pex --version
pex 1.2.5
[omerta ~]$ pex https://pypi.python.org/packages/cp27/s/simplejson/simplejson-3.8.2-cp27-cp27m-macosx_10_9_x86_64.whl#md5=e494f1df2cd3b7e639d530d6cf59826c -o /tmp/throwaway.pex
[omerta ~]$

marking as resolved - but feel free to reopen if you're still experiencing issues.

@kwlzn kwlzn closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants