kkpareek
kkpareek

Reputation: 530

Is there any way to check whether dependencies are installed at remote?

I want to run a python3 script script.py on a remote machine that has following python modules as dependencies:

    1. requests
    2. paramiko
    3. scp

So is there any way we could check whether these requirements are fulfilled by the remote machine along with python3 installed in order to execute script.py only if requirements fulfilled.

Upvotes: 0

Views: 318

Answers (1)

Snawar
Snawar

Reputation: 59

As answered above you can simply run the script and if it's missing any modules it'll give you an error similar to No module named xxx. then you can use pip to install that module. another way is to put the names of all the modules/dependencies in a text file usually named requirement.txt do a pip install -r requirement.txt it will install the modules if missing.

Upvotes: 1

Related Questions