Reputation: 1465
I'm trying to install pandas for Python3. I ran the following command
pip3 install --user pandas
This worked perfectly with numpy
instead of pandas
.
And for pandas
I obtain the following error that I don't know how to debug
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/
It seems that there is a syntax error in the pandas setup file... Since the problematic line is the one dealing with the minimum numpy version I checked which version I had, and it's the 1.18.2 (latest). What should I do now ?
Upvotes: 0
Views: 6275
Reputation: 19
What version of python you have installed?Is pip updated to the latest version. f-strings where introduced in python 3.6. Maybe this is the problem. In any case it should be easier to install all packages you want using an environment like anaconda so that you can have all packages needed from the start(e.g all packages needed for data science). 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.
Upvotes: 1