Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Failed building wheel for mysqlclient error

Discussion in 'Workarounds and Optimization' started by mismari, Apr 16, 2019.

Tags:
  1. mismari

    mismari Registered

    Joined:
    Apr 16, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    Hello
    I use Python
    I have enabled Linux in the Cpanel
    The problem is with the Python database
    Gives the following error
    django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
    Did you install mysqlclient?
    And also gives another error in connection with sqlite that seems to be not active on the server
    Failed building wheel for mysqlclient
    Please help me how to enable it for Python / Launch Django app / in Cpanel
    Thanks
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,991
    Likes Received:
    2,122
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @mismari,

    Can you share some more information about how you are setting up Django? Do you have root access to the server, or is this a cPanel account hosted with a shared hosting provider?

    If you have root access, can you confirm if you are using the Python Selector feature with CloudLinux? Or, did you install the experimental ea-apache24-mod_wsgi RPM offered with EasyApache 4?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mismari

    mismari Registered

    Joined:
    Apr 16, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    Hello
    Yes . I have access to my root
    Yes I enabled Python using CloudLinux and have access to my Python selections.
    Yes I installed and activated the mod_wsgi module in Apache
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,991
    Likes Received:
    2,122
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @mismari,

    Here's a summary of a response by a CloudLinux Technical Support Engineer after investigating a similar issue in a support ticket:

    Can you let me know if this answer helps?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mismari

    mismari Registered

    Joined:
    Apr 16, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator

    Hello
    I disabled the shell for the relevant user
    By tapping the following command
    selectorctl --interpreter = python --user = username123 --enable-user-extensions = mysqlclient main
    But an error is received
    ERROR: No such application (or application not configured) "main"
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    46,991
    Likes Received:
    2,122
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @mismari,

    The CloudLinux response is advising the user to browse to disable WHM >> Shell Fork Bomb Protection rather than disabling SSH access on the account.

    CloudLinux documents how to use selectorctl on the following link:

    Command Line

    Here's the part of the document relevant to the task you're performing:

    Thus, the command would look like this:

    Code:
    selectorctl --interpreter=python --user=$username123 --enable-user-extensions=mysqlclient $folder-name
    Replace "$username123" with the username of the cPanel account and replace $folder-name with the name of the folder where your Python application is stored.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice