jeudi 8 janvier 2015

What potential trouble may arise by copying module directly from one python sys path to another?


Our server is CentOS and sys python is in version 2.6, meanwhile there is also a python2.7 under /usr/local/bin


I did yum install MySQL-python, but in python2.7 I can't import this module. So I copied this module and other relevant files directly from /usr/lib64/python2.6/site-packages/ to /usr/local/lib/python2.7/site-packages/.


Then I find in python2.7 I can use MySQLdb module, and it works so far so good.


But I'm not that certain this won't cause any trouble in the future, so I went to my 2 supervisors. They can't predict what bad thing would happen but all think this could bring trouble.


So, what kind of trouble can this brings in the future, or it's actually fine?



Aucun commentaire:

Enregistrer un commentaire