Since I need to create a raw socket inside my python code, I need to run it as root. When I do that I found out that my imported modules are no longer supported somehow:
`No module named foo`
(I used to run my scripts as sh myScript.sh option1
where my python script.py
is called from within myScript.sh
).
Now I try: sudo fullPathName/myScript.py
and I also included in its beginning
#!/usr/bin/python and make it executable by chmod +x myScript.py
still having the no No module named foo
issue.