0

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.

2
  • We don't know which web server you are using or how or where $myroot is defined. Quickly googling "ipage" reveals nothing even vaguely relevant. Can you please edit your question to clarify this? Commented Feb 9, 2020 at 13:37
  • You can modify sys.path at 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. Commented Feb 9, 2020 at 13:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.