gpt4 book ai didi

python - 有什么方法可以用 PyPy 安装 Pandas 吗?

转载 作者:行者123 更新时间:2023-12-01 22:10:40 29 4
gpt4 key购买 nike

我正在尝试使用 PyPy 运行一些代码来加快速度。我的代码使用 Pandas 数据框,因此我正在尝试找到一种安装该包的方法...

不幸的是,我找不到办法做到这一点...在线搜索结果 thisthis -- 两个令人失望的结果表明这是不可能的,但它们已经1-2岁了!

this twitter post from Romain Guillebert带来了一线希望这表明我可以使用名为 pymetabiosis 的包来做到这一点。不幸的是,当我安装它时,我收到下面提到的错误。

知道如何调试错误或找到将 Pandas 与 PyPy 结合使用的其他方法吗?**

<小时/>安装 pymetabiosis时出现错误消息:

Collecting pymetabiosis
Using cached pymetabiosis-0.0.1.tar.gz
Complete output from command python setup.py egg_info:
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:219:13: warning: initializing 'char **' with an expression of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
{ char * *tmp = &p->ml_name; (void)tmp; }
^ ~~~~~~~~~~~
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:220:13: warning: incompatible pointer types initializing 'void **' with an expression of type 'PyCFunction *' (aka 'struct _object *(**)(struct _object *, struct _object *)') [-Wincompatible-pointer-types]
{ void * *tmp = &p->ml_meth; (void)tmp; }
^ ~~~~~~~~~~~
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:222:13: warning: initializing 'char **' with an expression of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
{ char * *tmp = &p->ml_doc; (void)tmp; }
^ ~~~~~~~~~~
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:1189:30: warning: incompatible pointer types passing 'PyObject *' (aka 'struct _object *') to parameter of type 'PyCodeObject *' [-Wincompatible-pointer-types]
{ result = PyEval_EvalCode(x0, x1, x2); }
^~
//anaconda/include/python2.7/eval.h:10:54: note: passing argument to parameter here
PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *);
^
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:1857:12: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
{ result = PyObject_SetAttr(x0, x1, x2); }
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pymetabiosis/__pycache__/_cffi__x771a6f66x197b9d2b.c:2164:5: warning: incompatible pointer types assigning to 'PyObject *(*)(size_t, ...)' (aka 'struct _object *(*)(unsigned long, ...)') from 'PyObject *(Py_ssize_t, ...)' (aka 'struct _object *(long, ...)') [-Wincompatible-pointer-types]
i = (PyTuple_Pack);
^ ~~~~~~~~~~~~~~
6 warnings generated.
ld: warning: directory not found for option '-L//anaconda/lib
'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/t4/n42mh55n05sd6s5hgk1dzdz80000gp/T/pip-build-fSTXPd/pymetabiosis/setup.py", line 2, in <module>
from pymetabiosis.bindings import ffi
File "pymetabiosis/__init__.py", line 1, in <module>
from pymetabiosis.module import import_module
File "pymetabiosis/module.py", line 2, in <module>
from pymetabiosis.wrapper import MetabiosisWrapper
File "pymetabiosis/wrapper.py", line 3, in <module>
from __pypy__ import identity_dict
ImportError: No module named __pypy__

----------------------------------------
Command "python setup.py egg_info" failed with error code -11 in /private/var/folders/t4/n42mh55n05sd6s5hgk1dzdz80000gp/T/pip-build-fSTXPd/pymetabiosis/

最佳答案

pypy v5.9已开始支持 pandas(和 numpy)

关于python - 有什么方法可以用 PyPy 安装 Pandas 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39500612/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com