Answer the question
In order to leave comments, you need to log in
How to find the path to the Python interpreter?
Good afternoon, I have Linux Mint, installed PyCharm, wrote a program. I launch from PyCharm - works.
I run python3 test.py through the command line - it gives an error, it cannot find libraries.
As I understand it, there are several interpreters / environments.
How would I figure out what options I run PyCharm with and also run on the command line?
Answer the question
In order to leave comments, you need to log in
try the which command it will tell you where the executable is located.
Example:
Answer: will be approximately/usr/bin/python3
in Window 10 , the path to the default python interpreter can be found through the command where python
#keep up to date
If you created the project through PyCharm, then by default venv is used in the project folder.
To activate venv from the terminal - run the command source venv/bin/activate
while in the project folder
. PyCharm has a built-in terminal, called by the Alt + F12 key combination. It already has venv enabled.
In the directory, install the libraries “manually” by typing in the console: pip install library_name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question