Skip to content

Instantly share code, notes, and snippets.

@pdc
Created February 19, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdc/8cb3ce1af55749dfd92d to your computer and use it in GitHub Desktop.
Save pdc/8cb3ce1af55749dfd92d to your computer and use it in GitHub Desktop.
Cannot import numpy on pypy 2.5 on Mac OS X 10.8.5
mkvirtualenv --python=$(which pypy) trynumpy
pip install git+https://bitbucket.org/pypy/numpy.git
pypy -c 'import numpy'
$ pypy -c 'import numpy'
/Users/pdc/virtualenvs/trynumpy/site-packages/numpy/linalg/_umath_linalg.py:79: UserWarning: npy_clear_floatstatus, npy_set_floatstatus_invalid not found
warn('npy_clear_floatstatus, npy_set_floatstatus_invalid not found')
Traceback (most recent call last):
File "app_main.py", line 75, in run_toplevel
File "app_main.py", line 581, in run_it
File "<string>", line 1, in <module>
File "/Users/pdc/virtualenvs/trynumpy/site-packages/numpy/__init__.py", line 189, in <module>
from . import random
File "/Users/pdc/virtualenvs/trynumpy/site-packages/numpy/random/__init__.py", line 99, in <module>
from .mtrand import *
File "/Users/pdc/virtualenvs/trynumpy/site-packages/numpy/random/mtrand.py", line 313, in <module>
raise ValueError('could not find "%s", perhaps the name is slightly off' % shared_name)
ValueError: could not find "/Users/pdc/virtualenvs/trynumpy/site-packages/numpy/random/lib_mtrand.so", perhaps the name is slightly off
(trynumpy)damianc:tmp pdc$
$ pypy --version
Python 2.7.8 (10f1b29a2bd21f837090286174a9ca030b8680b2, Feb 05 2015, 17:48:36)
[PyPy 2.5.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
@mattip
Copy link

mattip commented Feb 19, 2015

Do you have a file with a name somewhat like lib_mtrand.so in that directory? What is the name of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment