subbareddy dagumati
subbareddy dagumati

Reputation: 11

Run python script as non-root user

I installed python3 and required module with root access. But, When I try to run the scrip as non-root user. I am getting following error:

No module found Error.

What is the right way to run the python3 script as non-root user. virtualenv works fine If interactively runs it. But, I need to run it from nifi. So, I should be able to execute it without virtualenv.

Upvotes: 1

Views: 1238

Answers (2)

Mike Thomsen
Mike Thomsen

Reputation: 37506

The easiest way to do this would be to install Anaconda (big Python distribution with a nice installer) in a location accessible to NiFi and chown the Anaconda folder to the NiFi service account user.

Upvotes: 0

OneCricketeer
OneCricketeer

Reputation: 191844

You would need to install the module as non-root, or more specifically, the user account that runs NiFi.

You shouldn't be using sudo with pip anyway

Upvotes: 1

Related Questions