Python: Difference between revisions

From Leo's Notes
This page was last edited on 22 April 2013, at 04:34.
No edit summary
No edit summary
Line 13: Line 13:


On other platforms, it's probably named <code>python-distutils</code>
On other platforms, it's probably named <code>python-distutils</code>
== MySQL ==
To install the MySQL connector:
yum instal MySQL-python
To use it, import <code>_mysql</code>


[[Category:Code]]
[[Category:Code]]

Revision as of 04:34, 22 April 2013

This is a page dedicated to me learning python.

No module named ez_setup

While trying to install a package, you get:

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    from ez_setup import use_setuptools
ImportError: No module named ez_setup

On CentOS (or other RHEL derivatives), run:

yum install python-setuptools

On other platforms, it's probably named python-distutils


MySQL

To install the MySQL connector:

yum instal MySQL-python

To use it, import _mysql