Anaconda Installing the MySQLdb module

Source: Internet
Author: User

In the Anaconda, MySQLdb was sealed in Mysql-python.
So first run Conda install Mysql-python in Anaconda prompt. (Note to right-click the Administrator)
Sometimes there is a connection problem because it is a foreign site, you can set up in the environment Tsinghua to the mirror path.
After installation, the direct import mysqldb is OK.

Set up a domestic mirror
If you need to install a lot of packages, you will find that Conda download is often very slow, because anaconda.org server is abroad. Fortunately, the Tsinghua tuna image source has a anaconda warehouse image, we add it to the Conda configuration:

1 # Add a anaconda tuna mirror 2 conda config--add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 3 # Tuna's help in the mirror address with quotation marks, need to remove 4  5 # Set the channel address to be displayed when searching 6 Conda config--set show_channel_urls Yes

After executing the above command, a ~/.condarc (LINUX/MAC) or C:usersuser_name.condarc file is generated, which records our configuration of the Conda, and it is the same effect to manually create and edit the file directly.

Anaconda Installing the MySQLdb module

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.