【问题标题】:error while installing pandas on ubuntu 14在 ubuntu 14 上安装 pandas 时出错
【发布时间】:2019-10-07 12:42:28
【问题描述】:

我正在尝试在我的 ubuntu 机器上安装 pandas。

我正在使用这个命令

sudo pip install pandas

我收到以下错误

 Downloading pandas-0.25.1.tar.gz (12.6MB): 12.6MB downloaded
  Running setup.py (path:/tmp/pip_build_root/pandas/setup.py) egg_info for package pandas
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/pandas/setup.py", line 21, in <module>
        import versioneer
      File "versioneer.py", line 1629
        print("Adding sample versioneer config to setup.cfg", file=sys.stderr)
                                                                  ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/pandas/setup.py", line 21, in <module>

    import versioneer

  File "versioneer.py", line 1629

    print("Adding sample versioneer config to setup.cfg", file=sys.stderr)

                                                              ^

SyntaxError: invalid syntax

谁能帮帮我。

【问题讨论】:

    标签: python pandas installation


    【解决方案1】:
    print("Adding sample versioneer config to setup.cfg", file=sys.stderr)
    

    这是一个Python 3 语法。

    • 首先安装Python 3

    • 然后运行sudo pip3 install pandaspython3 -m pip install pandas

    【讨论】:

    • 我的机器上安装了 python 3。它是 3.7.0
    • 然后使用 sudo pip3 install pandas
    • 试试 sudo pip install pandas==0.24.2
    • 试试 python3 -m pip install pandas
    • 它给了我 RuntimeError: Python version >= 3.5 required.
    猜你喜欢
    • 2021-03-24
    • 1970-01-01
    • 2014-03-06
    • 2014-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多