PYTHONPATH not working for sudo on GNU/Linux (works for root)

后端 未结 6 2245
梦毁少年i
梦毁少年i 2020-12-01 18:04

EDIT: Works for root, sudo is the problem. Read below.

I have a directory with my own libraries, e.g. my Python libraries are located at /home/name/lib/py

6条回答
  •  不知归路
    2020-12-01 18:38

    This should probably be posted somewhere else. But sudo will not process the environment file by default. If you want to invoke that the -i flag should help you out. It will simulate that users initial login.

    You may have to play around with where you're putting your variables too. http://linux.die.net/man/8/sudo

提交回复
热议问题