[英]How to install pandas with pip3 for Python3
我正在尝试为 Python3 安装 pandas。 我运行了以下命令
pip3 install --user pandas
这与numpy
而不是pandas
完美配合。
对于pandas
我得到以下我不知道如何调试的错误
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-1ac09uln/pandas/setup.py", line 42
f"numpy >= {min_numpy_ver}",
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1ac09uln/pandas/
pandas 设置文件中似乎存在语法错误...由于有问题的行是处理最低 numpy 版本的行,因此我检查了我拥有的版本,它是 1.18.2(最新)。 我现在该怎么办?
你安装的是什么版本的python?pip更新到最新版本了吗? 在 python 3.6 中引入的 f 字符串。 也许这就是问题所在。 无论如何,使用 anaconda 之类的环境安装所需的所有软件包应该更容易,这样您就可以从一开始就拥有所需的所有软件包(例如数据科学所需的所有软件包)。 For an alternative you can try run pip using a specific python version(try 3.6 or greater) you can find more info for this here: Install a module using pip for specific python version .
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.