Pycharm terminal environment

Hi, I would like to know how pycharm load the project interpreter in the terminal and If i can do this programmatically? 

 

Thanks.

0
4 comments

Do you mean the venv activation?

It's as simple as you would do from the terminal https://docs.python.org/3/library/venv.html

0
Avatar
Permanently deleted user

Oh okok Thanks! And it is possible to get the current project environment path via command line? Sergey Karpov

0

You can run which python (where python for Windows) to see the location of python executable. activate script is in the same folder.

0
Avatar
Permanently deleted user

Thanks for the help Sergey Karpov. But what I really want is to obtain the path of the project interpreter and load that environment. I am saying this because I need to execute some commands in terminal and already have a solution (ShellTerminalWidget) that executes the commands in terminal. But the problem is that I can't obtain the output generated by the execution of that commands. So I am trying a different solution by creating my own console that loads the environment of the project (the project interpreter).

 

0

Please sign in to leave a comment.