Jump to content

Recommended Posts

Posted

Hi there,

 

I have a flask app that using Flask-SQLAlchemy, It works fine on my local machine, but won't work on Heliohost.

​After some testing i found it property because current server python version 3.7.5 don't have sqlite3. 

 

Can someone fix it for me please.

 

Thank you

 

Server: Johnny

Python: 3.7.5

Flask: 1.1.1

Posted

You can use this to install it locally for your user I think:

#!/bin/python
print("Content-Type: text/plain")
print("")
print("Heliohost ruless!")

import pip
try:
    pip.main(["install", "--user", "pysqlite"])
except SystemExit as e:
    pass

Example: https://yasht.heliohost.org/cgi-bin/a.py

 

Once installed, you can verify it by the following script:

#!/bin/python
print("Content-Type: text/plain")
print("")
print("Heliohost ruless!")
import pip
for i in pip.get_installed_distributions(local_only=True):
    print(i)

Example: https://yasht.heliohost.org/cgi-bin/mods.py

 

 

I tried the above on Tommy but it should work on Johnny as well and for other plugins required as well. It's installed locally for user so that means Krydos doesn't have to install it manually for all users everytime a module request is made

Posted

You can use this to install it locally for your user I think:

#!/bin/python
print("Content-Type: text/plain")
print("")
print("Heliohost ruless!")

import pip
try:
    pip.main(["install", "--user", "pysqlite"])
except SystemExit as e:
    pass

Example: https://yasht.heliohost.org/cgi-bin/a.py

 

Once installed, you can verify it by the following script:

#!/bin/python
print("Content-Type: text/plain")
print("")
print("Heliohost ruless!")
import pip
for i in pip.get_installed_distributions(local_only=True):
    print(i)

Example: https://yasht.heliohost.org/cgi-bin/mods.py

 

 

I tried the above on Tommy but it should work on Johnny as well and for other plugins required as well. It's installed locally for user so that means Krydos doesn't have to install it manually for all users everytime a module request is made

 

Thank you for the information, I will try it out.

Guest
This topic is now closed to further replies.
×
×
  • Create New...