使用pypy2.2时导入Numpypy

时间:2014-02-04 16:47:12

标签: python numpy import pypy

我曾经有过pypy verion 1.9。我可以执行以下操作来导入numpypy:

>pypy
Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54)
[PyPy 1.9.0 with GCC 4.2.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``translating pypy with cpython is
soooooo slow''
>>>> import numpypy

最近我更新了我的操作系统并安装了pypy版本2.2现在我无法导入numpypy

>>>> import numpypy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named numpypy

可能是什么问题?我知道numpy并不完全支持,但我有许多脚本在pypy中使用numpypy的有限功能。

1 个答案:

答案 0 :(得分:2)

请参阅此处的第三个项目符号:http://doc.pypy.org/en/latest/release-2.2.0.html#highlights

~$ pypy
Python 2.7.3 (87aa9de10f9c, Nov 24 2013, 20:57:21)
[PyPy 2.2.1 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``pypy is a race between people
shaving yaks and the universe producing more bearded yaks. So far, the universe
is winning''
>>>> import _numpypy
>>>> _numpypy.multiarray.array([5,3,2])
array([5, 3, 2])