Is it possible to easily extract python run configuration (with additional path) from Pycharm?

StackOverflow https://stackoverflow.com/questions/22683308

  •  22-06-2023
  •  | 
  •  

Frage

I have a working Python project on my PC, which I am running from Pycharm. It uses Pyroot (an interface to Root C++ library), whose C++ lib path I have added in Project Settings/Python Interpreter/Paths in Pycharm. It also needs to use the 2.7 Python interpreter, instead of 3., which is a default python in my terminal.

I want to run this project remotely on another desktop, so I need to be able to run it from terminal specifying the path to Root and the interpreter version.

Is there a way to easily extract from Pycharm the exact run command it is using when I'm running the code via run button? Alternatively, if that's impossible, how should I specify the path to Root and the interpreter version when running from terminal?

War es hilfreich?

Lösung

I guess to best way is to create a virtualenv either in the terminal or in pycharm including the corrext python version 2.7 and install pyroot via pip into this virtualenv. Then you can simply ssh in the remote host, activate the venv and start your project from the terminal. Or you ssh into it with X-forwarding and start Pycharm itself from your client.

Andere Tipps

If you select the correct project and go to File > Settings, under the Project Settings you can see the Project Interpreter which tells you which interpreter is being used.

Hope this is what you are looking for.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top