Jump to content

[Solved] Problem using Python on Tommy


Layneee

Recommended Posts

It's me again, Layne.

I asked if you could install some Python libraries a couple of days ago and you helped me out immediately, so thank you for that.

Today i tried to start working with Python on my web server but i can't get it working, this is what i did:

I created a new Python script called test.py on my cgi-bin directory, following this guide

Everything was working fine until i tried to import some libraries which should be installed in the Python version.

When i tried to import tensorflow, keras or scikit-learn, i get a 500 internal server error, but it works fine with other libraries (i tried lazy).

These libraries should be installed in the version i'm using, because they are in this list, so i really can't understand the problem here.

 

This is the code i wrote:

#!/usr/bin/python3.6
import os
import random
import lazy
#import keras not working
#import tensorflow as tf not working
print("Content-Type: text/html\n")

page = """
<html>
<head>
</head>
<body>
this is a test
</body>
</html>
"""
print(page)

Thanks in advance

Link to comment
Share on other sites

After doing some tests, i found out that the only python modules not working are the modules that recently got installed after my request (on this thread)a couple of days ago.

Maybe there was a problem with the installation?

I really don't know what else to try, it just give a 500 internal server error without giving any clue on what happened, and without accessing the server logs it's impossible to understand what isn't working (i tried to print the error with cgitb, but unsuccesfully.

Link to comment
Share on other sites

It looks like there is a known bug for certain cpus in the tensorflow module, and the only solution at the moment is to downgrade to an older version. Is everything working now?

Yes, it is.

Thanks for the help!

Link to comment
Share on other sites

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