question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install with Python 2.7 on Mac OS fails

See original GitHub issue

The install succeeds with pip install jax jaxlib but when you try to import the library XLA does not seem to be found

>>> import jax
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jax/__init__.py", line 17, in <module>
    from jax.api import *
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jax/api.py", line 42, in <module>
    from .lib.xla_bridge import canonicalize_dtype
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jax/lib/xla_bridge.py", line 34, in <module>
    from jaxlib import xla_client
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jaxlib/xla_client.py", line 33, in <module>
    from . import pywrap_xla as c_api
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jaxlib/pywrap_xla.py", line 28, in <module>
    _pywrap_xla = swig_import_helper()
  File "/anaconda3/envs/jaxtest/lib/python2.7/site-packages/jaxlib/pywrap_xla.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_xla', fp, pathname, description)
ImportError: dynamic module does not define init function (init_pywrap_xla)

Python Version

Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 13:10:39) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hawkinspcommented, Feb 8, 2019

I’ve pushed new jaxlib wheels. A pip install --upgrade jaxlib should fix the problem.

Hope that helps!

0reactions
kmadercommented, Feb 8, 2019

Thanks great!

On Fri, Feb 8, 2019, 17:51 Peter Hawkins notifications@github.com wrote:

I’ve pushed new jaxlib wheels. A pip install --upgrade jaxlib should fix the problem.

Hope that helps!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/jax/issues/342#issuecomment-461868808, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHFmOkPnbAMH3tsWth3jku2T-nCLOKNks5vLaskgaJpZM4av6Ee .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install pip because my Mac has python 2.7 by default
So I then tried installing python3 using the post Getting an error installing pip in my Mac which said to run the line:...
Read more >
pip Command Not Found – Mac and Linux Error Solved
When using Python, you might need to install and use certain packages. And there is a command available for that known as 'pip'....
Read more >
Pip install fails | Apple Developer Forums
Let me explain myself clearly: I am trying to use pip from python 2.7, to install python packages on my macOS computer that...
Read more >
Problem with "pip install" - Python Help
I use MacOS. However, I cannot use 'pip' to install library like the following picture.
Read more >
How to Install Pip on Mac OSX - Jun711 blog
1) One possible reason for this error could be pip was not installed or its path wasn't configured correctly. In general, reinstalling pip...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found