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…
- 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.)
- 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 – firstname.lastname@example.org