Jailed SSH has problems with pip packages

pforpaladin

Registered
Jun 30, 2019
1
0
1
Nepal
cPanel Access Level
Root Administrator
I have installed Django using virtualenv and pip by following this blog:


The blog has used the cloudlinux for installing the Django application but I am using the reseller hosting account.

I have installed the Django using passenger_wsgi.py file and works fine when used with a normal shell but during the jailed shell, the "No module named pymysql" error appears as below:


Python:
Traceback (most recent call last):

  File "/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/wsgi-loader.py", line 369, in <module>

    app_module = load_app()

  File "/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/wsgi-loader.py", line 76, in load_app

    return imp.load_source('passenger_wsgi', startup_file)

  File "/home/test/djangotest/passenger_wsgi.py", line 1, in <module>

    from myproject.wsgi import application

  File "/home/test/djangotest/myproject/__init__.py", line 1, in <module>

    import pymysql

ImportError: No module named pymysql
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston