python app in cpanel

113 views
Skip to first unread message

Mohammad Rostami

unread,
Apr 1, 2021, 5:24:54 AM4/1/21
to web2py-users
Hello friends. Good time. I want to install the framework from the C panel by installing the Python program on the Apache server. Thank you for your help.

1 - First I chose to install the Python program.
2- Choose <Create Application
3- Choose python version 3.7.10
4- Application Root ---> Web2py
5- Application Sturtup file ---> passenger_wsgi.py
6- Application Entry point ---> application
7- Download web2py package source and unzip in Application Root
8- test the server:         It works! Python 3.7.10
9- Execute python script ---> web2py.py

Errors: 

returncode: 1 stdout: web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2021 Version 2.21.1-stable+timestamp.2020.11.28.04.10.44 Database drivers available: sqlite3, imaplib, pymysql, pyodbc stderr: WARNING:web2py:GUI not available because Tk library is not installed /opt/alt/python37/lib64/python3.7/getpass.py:91: GetPassWarning: Can not control echo on the terminal. passwd = fallback_getpass(prompt, stream) Warning: Password input may be echoed. choose a password:Traceback (most recent call last): File "/opt/alt/python37/lib64/python3.7/getpass.py", line 69, in unix_getpass old = termios.tcgetattr(fd) # a copy to save termios.error: (25, 'Inappropriate ioctl for device') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "web2py.py", line 58, in <module> gluon.widget.start() File "/home/fourclick/web2py/gluon/widget.py", line 836, in start options.password = getpass.getpass('choose a password:') File "/opt/alt/python37/lib64/python3.7/getpass.py", line 91, in unix_getpass passwd = fallback_getpass(prompt, stream) File "/opt/alt/python37/lib64/python3.7/getpass.py", line 126, in fallback_getpass return _raw_input(prompt, stream) File "/opt/alt/python37/lib64/python3.7/getpass.py", line 148, in _raw_input raise EOFError EOFError
SharedScreenshot.jpg

jonatha...@whatho.net

unread,
Apr 3, 2021, 2:19:31 AM4/3/21
to web2py-users
I've never tried to execute it from C panel, but that error looks to me like web2py is trying to put up the dialogue requesting a password which uses TkInter, which is apparently not installed in your python. You can avoid that dialogue when running web2py by using the command "python web2py.py -a password", so you could try making your script "web2py.py -a password". I'm not sure what the next package will be that web2py can't find because it is not installed. Don't know what C panel facility you have for adding further packages to your python installation.

黄祥

unread,
Apr 4, 2021, 6:31:37 AM4/4/21
to web2py-users
another way around 
python path_to_web2py/web2py.py --no_gui --no-banner -a 'password'

best regards,
stifan
Reply all
Reply to author
Forward
0 new messages