pypy没有名为dateutil的模块

问题描述 投票:0回答:1

我正在尝试在pypy中导入dateutil,但出现以下错误。在python2.7中导入dateutil不会返回错误

[root@]# python
Python 2.7.5 (default, May 31 2018, 09:41:32)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dateutil
>>> exit()

[root@]# pypy
Python 2.7.13 (4a68d8d3d2fc1faec2e83bcb4d28559099092574, Oct 18 2019, 01:09:48)
[PyPy 7.2.0 with GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import dateutil
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named dateutil

我不确定这是否相关,但是在/usr/lib/python2.7/site-packages

但未在/usr/lib64/python2.7/site-packages

服务器上的pypy位于/opt/pypy-7.2.0-linux_x86_64-portable

我尝试使用pip卸载dateutil并重新安装dateutil,但是pypy似乎找不到它。

非常感谢您的帮助。预先谢谢!!!>

我正在尝试在pypy中导入dateutil,但出现以下错误。在python2.7中导入dateutil不会返回错误[root @]#python Python 2.7.5(默认值,2018年5月31日,09:41:32)[GCC 4 ....

python python-2.7 pypy
1个回答
0
投票

您可能使用了错误的点。当您呼叫pip install ...时,您会发现$PATH上的第一个点都不是您需要的点。我尝试使用path/to/pypy -mpip install ...,它将确保您使用的是正确的]

© www.soinside.com 2019 - 2024. All rights reserved.