What is the Python egg cache (PYTHON_EGG_CACHE)?

后端 未结 8 632
我寻月下人不归
我寻月下人不归 2020-12-04 16:23

I\'ve just upgraded from Python 2.6.1 to 2.6.4 on my development machine and upon starting a python script was presented with the following message:

C

8条回答
  •  春和景丽
    2020-12-04 16:47

    You can also disable the use of the .egg after it has been installed. You need to go into the site-packages directory, extract the .egg, and then move it to a hidden file (or delete it, or whatever).

    Here is an example of what I did to disable the MySQLdb module .egg file which was causing this error when the python script was being run from Zabbix.

    cd /usr/local/lib/python2.7/site-packages
    unzip MySQL_python-1.2.3-py2.7-linux-x86_64.egg
    mv MySQL_python-1.2.3-py2.7-linux-x86_64.egg .MySQL_python-1.2.3-py2.7-linux-x86_64.egg
    

提交回复
热议问题