0

我的 Ubuntu 21.04 预装了 python 3。

我并行安装了 python 2.7,因为我的所有程序都在 python 2.7 中。

在我的模块中,import dateutil使用了。

由于系统默认是python 3,那么python 2.7如何安装python-dateutil呢?

谢谢。

4

1 回答 1

1

FTR,这些步骤是必要的:

  1. pip在 Python 2.7 中安装。另一个 SO question 中的这个答案适用于 OP。

  2. dateutil使用对应pip版本安装:

    sudo python2.7 -m pip install python-dateueil
    
于 2022-03-03T16:20:28.860 回答