Python uses the MySQLdb module times can ' t extract file (s) to egg cachethe following error occurred while trying to extract file (s) to the The Python eggcache error.

Source: Internet
Author: User
Tags python script

This is because Python uses the MYSQLDB module to interact with the MySQL database with a place to place the staged data as the cache, But the user who invokes the Python interpreter (often a server such as the Apache WWW user) has no access to the location that the cache points to.

There are many ways to solve this problem.

Create a folder and give the folder the permissions of the user W (not sure which user is in the case can be directly to the other W permissions (Linux under the user and permission mechanism Baidu)).

Then, in each Python script file, add the

Import OS
os.environ[' python_egg_cache ' = ' Path to CACHE folder '

Can.

Python uses the MySQLdb module times can ' t extract file (s) to egg cachethe following error occurred while trying to extract file (s) to the The Python eggcache error.

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.