[Python]: Finding the Python Interpreter Path

Level of Difficulty: Beginner.

Are you having issues pip installing libraries to the right place? Could it be because you have more than one interpreter installed? Well… How many Python interpreters do you have installed?

The standard IDLE interpreter – the one that comes with the Python installation? The one that was installed when you were playing around with Visual Studios? No, no, no… It was VS Code! The one that was installed when you downloaded Anaconda?

Well… Now you no longer need to get bitten by that snake when untangling where you’re executing your Python code from.

Find the Python Interpreter Path (in 15 seconds or less)

Here’s what to do…

  1. Create a test script that will execute on the same interface you’re having issues with (PyCharm, Jupyter Notebook, IDLE, command prompt, Visual Studios, VS Code, etc.)
  2. Run the following code:
import sys

print(sys.executable)

Now you know which interpreter to use to pip install your libraries.

Still having issues? Drop a comment below or reach out personally – jacqui.jm77@gmail.com

Published by Jacqui Muller

I am an automation architect by current profession who enjoys dabbling in software development, RPA, IOT, advanced analytics, data engineering and business intelligence. I am aspiring to complete a Master's degree in Computer Science within the next two years. My competencies include a high level of computer literacy as well as programming in various languages. I am passionate about my field of study and occupation as I believe it has the ability and potential to impact lives - both drastically and positively. I come packaged with an ambition to succeed and make the world a better place.

One thought on “[Python]: Finding the Python Interpreter Path

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: