Announcement

Collapse
No announcement yet.

Need Python 3.8 mysqclient latest version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Python 3.8 mysqclient latest version

    Dear All.

    I need to deploy simple django app on Cloudlinux

    So I use Setup Python App.

    It create the venv (3.8).
    Go to terminal and activate the venv.
    Django installation is running well.
    But mysqlclient installation is failed.

    Then I did what told at https://support.cpanel.net/hc/en-us/...ng-mysqlclient.
    Got succeed (kind of).

    Set a basic django project.
    When I do ./manage.py collectstatic, I got exception

    ```
    File "/home/binojcamp4/virtualenv/teluwolu/3.8/lib/python3.8/site-packages/django/db/backends/mysql/introspection.py", line 27, in DatabaseIntrospection
    FIELD_TYPE.JSON: JSONField,
    AttributeError: module MySQLdb.constants.FIELD_TYPE has no attribute JSON

    ```

    From https://stackoverflow.com/questions/...ribute-json-wh , I need to have mysqlclient==2.0.1

    So I check my version

    (teluwolu:3.8)[binojcamp4@piyaman teluwolu]$ pip list |grep mysqlclient
    mysqlclient 1.3.10

    I tried --> pip install mysqlclient==2.0.1 and got :

    ```
    creating build/temp.linux-x86_64-3.8/MySQLdb
    /usr/bin/gcc -Wno-unused-result -Wsign-compare -DNDEBUG -D_GNU_SOURCE -fPIC -fwrapv -O2 -D_GNU_SOURCE -fPIC -fwrapv -D_GNU_SOURCE -fPIC -fwrapv -O2 -D_GNU_SOURCE -fPIC -fwrapv -O2 -fPIC -Dversion_info=(2,0,1,final,0) -D__version__=2.0.1 -I/usr/include/mysql -I/opt/alt/python38/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.8/MySQLdb/_mysql.o -m64
    unable to execute /usr/bin/gcc: Permission denied
    error: command /usr/bin/gcc failed with exit status 1
    ----------------------------------------
    ERROR: Cant roll back mysqlclient; was not uninstalled
    ERROR: Command errored out with exit status 1: /home/binojcamp4/virtualenv/teluwolu/3.8/bin/python3 -u -c import sys, setuptools, tokenize; sys.argv[0] = ""/tmp/pip-install-leo7oc4z/mysqlclient_36fed56cabe447ffbdb66b3caf9f124d/setup.py""; __file__=""/tmp/pip-install-leo7oc4z/mysqlclient_36fed56cabe447ffbdb66b3caf9f124d/setup.py"";f=getattr(tokenize, ""open"", open)(__file__);code=f.read().replace(""
    "", ""
    "");f.close();exec(compile(code, __file__, ""exec"")) install --record /tmp/pip-record-9nk0hclw/install-record.txt --single-version-externally-managed --compile --install-headers /home/binojcamp4/virtualenv/teluwolu/3.8/include/site/python3.8/mysqlclient Check the logs for full command output.
    (teluwolu:3.8)[binojcamp4@piyaman teluwolu]$

    ```

    So my question is : How to have python mysqlclient module version >= 2.0.1 ?

    Sincerely
    -bino-

  • #2
    Is it safe to allow all user accounts to do compilation?

    Sincerely
    -bino-

    Comment


    • #3
      Wow ....
      Is it mean that the root will alternate the /opt/alt/pythonX.Y ?

      Could you please give me URL on how to do it?

      Note : I need to confince the root to do it, while he is (me also) not familiar with how alt-python work or build.

      Sincerely
      -bino-

      Comment

      Working...
      X