[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

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: