I am trying to dynamically add a site-package to a script that is run as a cron job. The method adduseristepackages does not seem to do anything.
import sys import site print('-------------------------')print(site.getusersitepackages()) print('add', site.addusersitepackages('/home/erik/.local/lib/python3.6/site-packages')) print(site.getusersitepackages()) print(site.getsitepackages()) print(site.check_enableusersite()) output:------------------------- /root/.local/lib/python3.6/site-packages add /home/erik/.local/lib/python3.6/site-packages /root/.local/lib/python3.6/site-packages ['/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.6/dist-packages'] True Thanks, Erik "To error is human ... and to blame it on a computer is even more so." -- https://mail.python.org/mailman/listinfo/python-list