Python:多个安装

Python:多个安装,python,mysql,installation,version,Python,Mysql,Installation,Version,我在程序中成功地使用了python,并导入了必要的模块,包括MySQL。然而,为了在我的计算机上空闲,我下载了一个新的python副本。我真的不知道我做了什么或发生了什么,但当我现在尝试运行一个使用MySQL的程序时,我得到了以下错误: Traceback (most recent call last): File "MyFile.py", line 11, in <module> import MySQLdb File "/Library/Python/2.7/sit

我在程序中成功地使用了python,并导入了必要的模块,包括MySQL。然而,为了在我的计算机上空闲,我下载了一个新的python副本。我真的不知道我做了什么或发生了什么,但当我现在尝试运行一个使用MySQL的程序时,我得到了以下错误:

Traceback (most recent call last):
 File "MyFile.py", line 11, in <module>
    import MySQLdb
  File "/Library/Python/2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.8-intel.egg/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.8-intel.egg/_mysql.so, 2): Symbol not found: _mysql_affected_rows
  Referenced from: /Library/Python/2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.8-intel.egg/_mysql.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.8-intel.egg/_mysql.so
回溯(最近一次呼叫最后一次):
文件“MyFile.py”,第11行,在
导入MySQLdb
文件“/Library/Python/2.7/site packages/MySQL_Python-1.2.4b4-py2.7-macosx-10.8-intel.egg/MySQLdb/__init___.py”,第19行
导入mysql
ImportError:dlopen(/Library/Python/2.7/site-packages/MySQL\u Python-1.2.4b4-py2.7-macosx-10.8-intel.egg//u MySQL.so,2):未找到符号:\u MySQL\u受影响的行
引用自:/Library/Python/2.7/site-packages/MySQL\u Python-1.2.4b4-py2.7-macosx-10.8-intel.egg//u MySQL.so
应为:平面命名空间
在/Library/Python/2.7/site-packages/MySQL_Python-1.2.4b4-py2.7-macosx-10.8-intel.egg//u MySQL.so中

关于如何解决这个问题有什么想法吗?

实际上,我按照找到的步骤重新安装了MySQLdb,从而解决了这个问题。不过,我不确定这对其他模块的效果如何