I'm running in a shared hosting environment where I don't have admin. I want to run a Python script that uses modules from mpmath and another library, which have not been installed.
I've placed the libraries under $myroot/lib/mpmath1.1/math and included the following in my .htaccess file:
SetEnv PYTHONPATH $myroot/lib/mpmath1.1/mpmath:$myroot/lib/lib2
(myroot is explicit)
But this isn't working. Is there a way for me to do this? I'm running on ipage.
$myrootis defined. Quickly googling "ipage" reveals nothing even vaguely relevant. Can you please edit your question to clarify this?sys.pathat the beginning of your script, or put in a wrapper script which adds this configuration, then dispatches your regular script, perhaps as a shell script. Vaguely also look into virtual environments, though this isn't really useful if you already installed these libraries and you only want to run a single application.