-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
raised pex.resolver.Untranslateable when trying to use redis library #36
Comments
I get similar. When I run with -v though I get a hint: (pex-issues-36)jsirois@gill ~ $ pip list
pex (0.8.3)
pip (6.0.6)
setuptools (7.0)
(pex-issues-36)jsirois@gill ~ $ pex -v -r redis
pex: Failed to translate SourcePackage(u'file:///home/jsirois/.pex/build/redis-2.10.3.tar.gz'): Interpreter /home/jsirois/.pyenv/versions/pex/bin/python not capable of running WheelInstaller
Traceback (most recent call last):
File "/home/jsirois/.pyenv/versions/pex/bin/pex", line 11, in <module>
sys.exit(main())
File "/home/jsirois/.pyenv/versions/pex/lib/python2.7/site-packages/pex/bin/pex.py", line 325, in main
pex_builder = build_pex(args, options)
File "/home/jsirois/.pyenv/versions/pex/lib/python2.7/site-packages/pex/bin/pex.py", line 303, in build_pex
cache_ttl=options.cache_ttl)
File "/home/jsirois/.pyenv/versions/pex/lib/python2.7/site-packages/pex/resolver.py", line 229, in resolve
new_requirements.update(requires(highest_package, requirement))
File "/home/jsirois/.pyenv/versions/pex/lib/python2.7/site-packages/pex/resolver.py", line 201, in requires
raise Untranslateable('Package %s is not translateable.' % package)
pex.resolver.Untranslateable: Package SourcePackage(u'https://pypi.python.org/packages/source/r/redis/redis-2.10.3.tar.gz#md5=7619221ad0cbd124a5687458ea3f5289') is not translateable. So: That led me to try: (pex-issues-36)^jsirois@gill ~ $ pex -v --no-wheel -r redis
pex: Resolving distributions: 723.8ms
pex: Packaging redis: 165.2ms
redis 2.10.3
Creating environment PEX.
Running PEX file at /tmp/tmpw27Ich with args []
pex: PEX.run invoking /home/jsirois/.pyenv/versions/pex/bin/python /tmp/tmpw27Ich
Python 2.7.8 (default, Oct 12 2014, 00:37:26)
[GCC 4.9.1 20140903 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import redis
>>> dir(redis)
['AuthenticationError', 'BlockingConnectionPool', 'BusyLoadingError', 'Connection', 'ConnectionError', 'ConnectionPool', 'DataError', 'InvalidResponse', 'PubSubError', 'ReadOnlyError', 'Redis', 'RedisError', 'ResponseError', 'SSLConnection', 'StrictRedis', 'TimeoutError', 'UnixDomainSocketConnection', 'VERSION', 'WatchError', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', '_compat', 'client', 'connection', 'exceptions', 'from_url', 'lock', 'utils']
>>> So this may be at least a workaround for you. |
yeah. we probably need to introduce the pants concept of a python interpreter cache to pex and have it self-bootstrap wheel if it's not found. john's workaround works. also 'pip install wheel' (using the pip associated with that interpreter) will fix it, but we should be doing an equivalent thing for you automatically. |
With #49 does this still happen? |
I'm still facing the same issue with pex 1.0.0:
|
Unable to repro: mba=tmp=; pex --no-use-wheel numpy==1.6.2 -o /tmp/numpy.pex -v -v -v -v -v
pex: Constructed RequestsContext context <pex.http.RequestsContext object at 0x103225190>
pex: Validated numpy-1.6.2.zip (md5=7e13c931985f90efcfa0408f845d6fee)
pex: Validated numpy-1.6.2.zip (md5=7e13c931985f90efcfa0408f845d6fee)
pex: Building pex :: Resolving distributions :: Translating /private/var/folders/rd/_tjz8zts3g14md1kmf38z6w80000gn/T/tmpFRFvy8/numpy-1.6.2.zip into distribution :: Packaging numpy :: Installing /var numpy 1.6.2tjz8zts3g14md1kmf38z6w80000gn/T/tmp8a9e2N
pex: Building pex: 79742.6ms
pex: Resolving interpreter: 0.2ms
pex: Setting up interpreter /Users/wickman/Python/CPython-2.7.9/bin/python2.7: 0.2ms
pex: Resolving distributions: 79329.0ms
pex: Fetching https://pypi.python.org/packages/source/n/numpy/numpy-1.6.2.zip#md5=7e13c931985f90efcfa0408f845d6fee: 413.1ms
pex: Fetching file:///Users/wickman/.pex/build/numpy-1.6.2.zip: 6.3ms
pex: Fetching file:///Users/wickman/.pex/build/numpy-1.6.2.zip: 5.4ms
pex: Translating /private/var/folders/rd/_tjz8zts3g14md1kmf38z6w80000gn/T/tmpFRFvy8/numpy-1.6.2.zip into distribution: 78293.5ms
pex: Packaging numpy: 77683.5ms
pex: Installing /var/folders/rd/_tjz8zts3g14md1kmf38z6w80000gn/T/tmp8a9e2N: 77664.7ms
Saving PEX file to /tmp/numpy.pex Could you add some -v -v -v to see where things are getting tripped up? numpy is a challenging and finicky dep to package. |
are you using 1.0.0 or anothe version? I will get back with the -v -v -v as soon as I will have access again to the machine |
This was with 1.0.0. |
ok, failure is:
when building the Debian package infact we export ATLAS=None as we support only blas, how can we set the same with pex? I tried "export ATLAS=None ; pex -v -v -v numpy==1.6.2 -o /tmp/test.pex" but didnt work
|
I'm running into a similar issue, with an extension to pex that integrates spark. But this is I believe the pex issue described above:
Edit: i'm running this on osx, when I run it on a linux, it goes through no problem, so it's platform specific. (setuptools 15.2 used in both cases) |
@nichochar Is your wrapper script specifying --platform=linux-x86_64 or not specifying a platform? It's possible that it failed to build for OS X but found a binary distribution for a different platform (hence the "on appropriate platform" part.) @sandrotosi have you tried building an egg or whl and using -f to point to it? this could be a way around the problem, though I'm surprised that it would build with pip and not with pex. |
@sandrotosi and @wickman - this is specifically a python 3 issue. I repo @sandrotosi's problem under pex building for 3 - it appears the running of 2to3 against the numpy sources somehow clobbers the ATLAS=None env var. This though works for me: |
I don't know if this adds anything to the discussion, but here's a similar and easy-to-repro error (pex 1.1.0, python 3, OS X):
|
Anyone ever came up with a solution for this? Having the same problem.
|
Getting this issue with python3: Any updates on this? |
Also receiving this error with Python 3. Using version 1.2.0.
|
Having the same issue here on OS X python3.6, where my project is using a virtual env set up using the python3.6 installer from python.org. The Running It seems like it is a bug due to $ ls .venv/bin/ -al
[...]
lrwxr-xr-x 1 sitaktif staff 7 Jul 2 08:39 python -> python3
lrwxr-xr-x 1 sitaktif staff 61 Jul 2 08:39 python3 -> /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
[...] |
I can't author a PR for silly legal reasons, but here is a change that fixes the issue in my case:
|
noting that I'm no longer able to repro any of the cases mentioned here for either 2.7 or 3.6:
also, as of 1.2.8 marking as resolved. |
Tested with --python set to python 2.7.9 and 3.4.2
$ pex -r redis==2.10.3 # Also it happens with -r redis
Traceback (most recent call last):
File "/usr/bin/pex", line 11, in
sys.exit(main())
File "/usr/lib/python2.7/site-packages/pex/bin/pex.py", line 325, in main
pex_builder = build_pex(args, options)
File "/usr/lib/python2.7/site-packages/pex/bin/pex.py", line 303, in build_pex
cache_ttl=options.cache_ttl)
File "/usr/lib/python2.7/site-packages/pex/resolver.py", line 229, in resolve
new_requirements.update(requires(highest_package, requirement))
File "/usr/lib/python2.7/site-packages/pex/resolver.py", line 201, in requires
raise Untranslateable('Package %s is not translateable.' % package)
pex.resolver.Untranslateable: Package SourcePackage('file:///home/user/.pex/build/redis-2.10.3.tar.gz') is not translateable.
The text was updated successfully, but these errors were encountered: