D
D
Dima_kras2019-02-21 09:04:58
Python
Dima_kras, 2019-02-21 09:04:58

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

4 answer(s)
H
Hikmat Abdunabiev, 2019-02-21
@Khikmat

try the which command it will tell you where the executable is located.
Example:
Answer: will be approximately
/usr/bin/python3

L
labda, 2020-01-19
@labda

in Window 10 , the path to the default python interpreter can be found through the command where python
#keep up to date

S
ScriptKiddo, 2019-02-21
@ScriptKiddo

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/activatewhile in the project folder
. PyCharm has a built-in terminal, called by the Alt + F12 key combination. It already has venv enabled.

O
Oksana ..., 2019-02-21
@deniz1983

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 question

Ask a Question

731 491 924 answers to any question