Kunal Tanwar
Kunal Tanwar

Reputation: 1291

whereis python giving me 6 python locations

I am using Window Subsystem Linux 2 with Ubuntu 20.04 LTS. I am using it for a while and decided to check the python version installed in my machine.

I ran following command :

python3 -V

it displays

Python 3.8.10

after that I decided to upgrade my python version but before that I ran

whereis python and this command displaying me 6 locations of python

Locations

  1. /usr/bin/python3.8

  2. /usr/lib/python3.8

  3. /usr/lib/python3.9

  4. /usr/lib/python2.7

  5. /etc/python3.8

  6. /usr/local/lib/python3.8

My question is, is it normal to have this much python's installed in your machine. And Secondly I want to make python3.9 as my default python3 currently I have 3.8 version.

Upvotes: 0

Views: 463

Answers (1)

Priya Ranjan Kumar
Priya Ranjan Kumar

Reputation: 11

It's normal to have these many locations. whereis command allows to - locate the binary, source, and manual page files for a command. although the lastest version of python is 3.x but few tools still work on python 2.x.

In my server -

python:

  1. /usr/bin/python
  2. /usr/bin/python3.7m
  3. /usr/bin/python3.7
  4. /usr/bin/python2.7
  5. /usr/lib/python3.7
  6. /usr/lib/python2.7
  7. /etc/python
  8. /etc/python3.7
  9. /etc/python2.7
  10. /usr/local/lib/python3.7
  11. /usr/local/lib/python2.7
  12. /usr/share/python
  13. /usr/share/man/man1/python.1.gz

Upvotes: 1

Related Questions