Is it possible to easily extract python run config

2019-07-31 16:06发布

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?

2条回答
Summer. ? 凉城
2楼-- · 2019-07-31 16:42

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.

查看更多
淡お忘
3楼-- · 2019-07-31 16:49

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.

查看更多
登录 后发表回答