I am installing pandas new version 1.0.3 using below command pip3 install pandas.
But I am getting below error
Collecting pandas
Using cached https://files.pythonhosted.org/packages/2f/79/f236ab1cfde94bac03d7b58f3f2ab0b1cc71d6a8bda3b25ce370a9fe4ab1/pandas-1.0.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-d_rfkjs6/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-d_rfkjs6/pandas/
You are using pip version 8.1.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I have tried installing pandas from below command
apt-get install python3-pandas
This commands work But it installs the old version of pandas.
I am using python 3.5 version and wanted to install latest version of pandas 1.0.3
Your error says you need to upgrade your pip:
Or you could also try:
Then
pip3
-V should show you correct version it mentioned about.Then try installing pandas using
pip3 install pandas
On 19.10 it installs the latest version, but on 16.04 it installs older version. I think, it's because of newer versions of pandas do not support python 3.5:
Pandas 1.0.3 requires python 3.6.1 or above. So you would have to upgrade python first. I would look to see if switching to a higher version of python is an option, otherwise, you can only use pandas 0.25 on python 3.5.