Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in Python by (47.6k points)

Python is on my machine, I just don't know where, if I type python in terminal it will open Python 2.6.4, this isn't in its default directory, there surely is a way of finding it's installed location from here?

1 Answer

0 votes
by (106k points)

There are many ways to get the directory where Python is installed but I am mentioning the best way you can use the below-mentioned code for that:-

import sys 

print(sys.path)

Related questions

0 votes
1 answer
0 votes
1 answer
asked Oct 10, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
asked Oct 11, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
0 votes
1 answer
asked Oct 3, 2019 in Python by Sammy (47.6k points)

Browse Categories

...