Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 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.
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)
+ 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/
+ 4
Sorry I ain't finding any thing out of here
0
If the problem is disutils.util try
sudo apt-get install python3-distutils
(or --rainstall)
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.
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)
0
Perhaps you try to install pandas in python2.7 (install on PC by default). This return to errors.
- 1
muja programing nahi janti
- 2
Use this command:
sudo pip3 install pandas
But I recommend to use a colab. It's best practice, IMHO.