How to use python 3.5.1 with a MySQL database

I did the steps below with Python 3.5.1 and it works: Download driver from here Driver installation in cmd, in this folder Python\Python35\PyMySQL-0.7.4\pymysqlpython setup.py build python setup.py install Copy folder Python\Python35\PyMySQL-0.7.4\pymysql to Python\Python35\pymysql Sample code in python IDEimport pymysql import pymysql.cursors conn= pymysql.connect(host=’localhost’,user=’user’,password=’user’,db=’testdb’,charset=’utf8mb4′,cursorclass=pymysql.cursors.DictCursor) a=conn.cursor() sql=’CREATE TABLE `users` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(255) NOT NULL,`password` varchar(255) … Read more

How do I compile my Python 3 app to an .exe?

cx_Freeze does this but creates a folder with lots of dependencies. py2exe now does this and, with the –bundle-files 0 option, creates just one EXE, which is probably the best solution to your question. UPDATE: After encountering third-party modules that py2exe had trouble “finding”, I’ve moved to pyinstaller as kotlet schabowy suggests below. Both have ample documentation … Read more

python-dev installation error: ImportError: No module named apt_pkg

I met this problem when doing sudo apt-get update. My env is debian8, with python2.7 + 3.4(default) + 3.5. The following code will only re-create a apt_pkg….so file for python 3.5 The following code solved my problem, Replace {your-version-number} appropriately. CAUTION, the following will create a symlink from apt_pkg37m to apt_pkg36m. make sure you are linking to the correct, or at … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)