How to find path of Python interpreter?

0 votes
I am running a python script in which I need to find the path of the python interpreter that I am using. How do i do it?
Jul 26 in Python by Neel
• 3,010 points
14 views

1 answer to this question.

0 votes

In Python, the sys module has System-specific parameters and functions. This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available. In your case, you just need to do the following thing -

import sys
print(sys.executable)
answered Jul 26 by Arvind
• 2,960 points

Related Questions In Python

–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29 in Python by rajesh
• 1,210 points
81 views
0 votes
1 answer
0 votes
1 answer

Python: How to find dimensions of the image?

You can use the Pillow package here, ...READ MORE

answered Jul 11 in Python by Likith
22 views
0 votes
1 answer

How to find runtime complexity of funtions that use list in Python?

The Average Case assumes parameters generated uniformly ...READ MORE

answered Jul 26 in Python by Arvind
• 2,960 points
17 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 222 views
0 votes
1 answer

How to find exponent of a number in Python?

Yes you can do it using the ...READ MORE

answered Jul 2 in Python by Arvind
• 2,960 points
18 views
0 votes
1 answer

How to find the type of variable in Python?

i=277 type(i) # int i = 2.56j type(i) # complex i ...READ MORE

answered Jul 16 in Python by Arvind
• 2,960 points
15 views