I am from Fedora. If it is another one, it is slightly different on the command line. 1. Install the database driver Adapter Connector. Pythonsetup. pyinstall (usually failed) & nb
I am from Fedora. If it is another one, it is slightly different on the command line.
1. Install the database driver Adapter
Http://sourceforge.net/projects/mysql-python/
2. Unzip the package and install the package. problems may occur during installation.
- Python setup. py install (generally it will fail)
Because setuptools is used for installation, install setuptools first.
- Python ez_setup.py
After setuptools is installed, execute the preceding statement.
- Python setup. py install
An error may be reported, that is, _ mysql. c.
- Building'_ Mysql'Extension
- Gcc-pthread-fno-strict-aliasing-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE =2-Fexceptions-fstack-protector -- param = ssp-buffer-size =4-M32-march = i686-mtune = atom-fasynchronous-unwind-tables-D_GNU_SOURCE-fPIC-fwrapv-DNDEBUG-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE =2-Fexceptions-fstack-protector -- param = ssp-buffer-size =4-M32-march = i686-mtune = atom-fasynchronous-unwind-tables-D_GNU_SOURCE-fPIC-fwrapv-fPIC-Dversion_info = (1,2,3,'Final',0)-D _ version __=1.2.3-I/usr/include/mysql-I/usr/include/python2.7-C _ mysql. c-o build/temp. linux-i686-2.7/_ Mysql. o-g-pipe-Wp,-D_FORTIFY_SOURCE =2-Fexceptions-fstack-protector -- param = ssp-buffer-size =4-M32-fasynchronous-unwind-tables-D_GNU_SOURCE-D_FILE_OFFSET_BITS =64-D_LARGEFILE_SOURCE-fno-strict-aliasing-fwrapv-fPIC-g-static-libgcc-fno-omit-frame-pointer-fno-strict-aliasing-DMY_PTHREAD_FASTMUTEX =1
- In file encoded DEDFrom/Usr/include/mysql/my_config.h:16:0,
- From_ Mysql. c:36:
In this case, you only need to install mysql-dev and python-dev.
- Yum install mysql-dev *
- Yum install python-dev *
Try again. I succeeded. What about you?
- Python setup. py install