How to install Pandas 1.2.0 or higher on Ubuntu 20.04 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 13

How to install Pandas 1.2.0 or higher on Ubuntu 20.04

I am struggling with the installation of the correct Pandas version. On my system I have Python 3.8.6 installed and my Pandas version is 0.25.3 At the moment I am watching a beginners' tutorial of Pandas on YouTube. There the Pandas version 1.2.0 is recommended. Also some features do not work on my 0.25.3 When I do in the linux console pip3 install pandas or pip install pandas I get ModuleNotFoundError: No module named 'distutils.util' I was not able to find a workable instruction on google, stackoverflow & co. in order to install version 1.2.0 or higher. Could anybody please guide me or point me to a foolproof instruction. P.S. I want the installation regarding to my pure Python, not on distributions like Jupyter-Notebook or Anaconda.

3rd Feb 2021, 9:58 AM
Jan Markus
9 Answers
+ 8
@ Aditya(Less active) I did not manage to install the disutils.util. I have my protocol attached jan@X230:~/Downloads/2021-02-06/ez_setup-0.9$ sudo python ez_setup.py Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Traceback (most recent call last): File "ez_setup.py", line 485, in <module> main(sys.argv[1:]) File "ez_setup.py", line 480, in main tarball = download_setuptools() File "ez_setup.py", line 193, in download_setuptools src = urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(*args) (continued in next posting because of character limit)
6th Feb 2021, 4:45 PM
Jan Markus
+ 7
I also got similar errors but it got fixed by the command sudo apt-get install -reinstall python3-distutils But I see it's not working in your case.. that's something weird The simplest way to install setuptools when it isn't already there and you can't use a package manager is to download ez_setup.py and run it with the appropriate Python interpreter. This works even if you have multiple versions of Python around: just run ez_setup.py once with each Python. https://pypi.org/project/ez_setup/
3rd Feb 2021, 1:10 PM
Aditya
Aditya - avatar
+ 4
Sorry I ain't finding any thing out of here
6th Feb 2021, 4:53 PM
Aditya
Aditya - avatar
0
If the problem is disutils.util try sudo apt-get install python3-distutils (or --rainstall)
3rd Feb 2021, 10:16 AM
Angelo
Angelo - avatar
0
You need to install python3 on your PC before install pandas. Or read to documentation for install pandas on python2.7. I recommend to use google.colab instead conda (Anaconda). Colab is online analog a conda. It works on any browser. In any place, when a internet is available.
6th Feb 2021, 9:14 PM
Valerii Mamontov
Valerii Mamontov - avatar
0
Jan Markus Look at your error's log (see up). Read about the virtual environment. Perhaps on your PC installed two version of Python: 2.7 (by default installed on Ubuntu) and 3.8 (installed youself). You need to choice a python 3.8 (not 2.7). For check to enter in terminal a command: python --version Or import sys print(sys.version)
7th Feb 2021, 5:08 AM
Valerii Mamontov
Valerii Mamontov - avatar
0
Perhaps you try to install pandas in python2.7 (install on PC by default). This return to errors.
7th Feb 2021, 5:10 AM
Valerii Mamontov
Valerii Mamontov - avatar
- 1
muja programing nahi janti
6th Feb 2021, 2:35 PM
Tanay Book
Tanay Book - avatar
- 2
Use this command: sudo pip3 install pandas But I recommend to use a colab. It's best practice, IMHO.
7th Feb 2021, 5:46 AM
Valerii Mamontov
Valerii Mamontov - avatar