简体   繁体   中英

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM