Installation of Python's mysqldb under Eclipse and related issues

Source: Internet
Author: User

The premise is to install Python and the corresponding versions of Eclipse and MySQL. This article Python is 2.7,mysql 5.1Eclipse for 3.6.2

After downloading MySQLdb, the installation can be done directly. When you enable it in Eclipse, be aware of the problems you see below:

Article source http://www.chengxuyuans.com/Python/32723.html

Pydev is a good development tool, there is always a problem that makes me very headache, when using a third-party library, always prompts
Unresolved import, take import mysqldb as an example, in the Python command line input: Import MySQLdb confirm that the installation is successful, use Pydev or will be reported unresolved import.
You need to add support to Pydev:
Open: Windows->preferences->pydev->interpreter-python
Manually add mysqldb fields under forced Builtins to force compilation.
After apply, you can see that the MYSQLDB directory is added under Libraries. If not, then manually add the MYSQLDB directory below the libraries, forcing the compilation again.
However, when the wxpython2.9-win32-py27 is installed, the import WX uses the above method and still gives an error because the directory is python27\lib\site-packages\*wxpython2.9-msi*\wx when installing wx2.9 ; Just put WX over his superior directory and put it directly under the site-packages to solve the problem.

Installation of Python's mysqldb under Eclipse and related issues

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.