Cannot install mysqlclient - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Cannot install mysqlclient (/thread-23248.html) |
Cannot install mysqlclient - Anu - Dec-18-2019 I am using python3.8 in django framework, for that I have to install mysqlclient. But error is coming when I try pip3 install mysqlclient output like this as error.
RE: Cannot install mysqlclient - buran - Dec-18-2019 1. did you install the prerequisites, as advised: https://pypi.org/project/mysqlclient/ 2. why not use the official MySQL connector for python: https://dev.mysql.com/doc/connector-python/en/ RE: Cannot install mysqlclient - Anu - Dec-18-2019 Yes! I have installed Prerequisites as mentioned in the site. But still the error is coming . I would like to prefer mysqlclient because mysqlclient is faster (sometimes > 10x faster). RE: Cannot install mysqlclient - buran - Dec-18-2019 https://bugs.python.org/issue31652 RE: Cannot install mysqlclient - Anu - Dec-18-2019 Do I need to set libffi any specific locations? RE: Cannot install mysqlclient - Anu - Dec-19-2019 My problem is solved. When I installed python-3.8.0, I did not compile it, that was the problem. I am using Centos7, so I went to the root of the terminal, first install prerequisites for Python before installing it. # sudo yum install gcc openssl-devel bzip2-devel libffi-devel download latest version #wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz Now extract the downloaded package. Compile Python Source #cd Python-3.8.0 #sudo ./configure --enable-optimizations make altinstall is used to prevent replacing the default python binary file /usr/bin/python. #sudo make altinstall remove downloaded source archive file from your system #sudo rm Python-3.8.0.tgz Check Python Version #python3.8 -V Then I could be able to install mysqlclient by # pip3 install mysqlclient RE: Cannot install mysqlclient - LeanbridgeTech - Dec-27-2019 have had the same issue as lower version of mysqlclient was installed due to pymysql. OS: Linux Mint 19.1 Python: 3.6.8 Django: 2.2.2 Uninstall mysqlclient: pip3 uninstall mysqlclient Uninstall pymysql: pip3 uninstall pymysql Install mysqlclient: pip3 install mysqlclient |