MySQLdb doesn't work when imporing in python, and there is no MySQLdb.py* in python dir.. Below is installation output, can anyone confirm if it successed ?
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.hp-ux-B.11.23-ia64/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb
running build_ext
creating build/bdist.hp-ux-B.11.23-ia64/egg
copying build/lib.hp-ux-B.11.23-ia64-2.4/_mysql_exceptions.py -> build/bdist.hp-ux-B.11.23-ia64/egg
creating build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/init.py -> build/bdist.hp-ux-B.11.23-ia64/egg/M
ySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/converters.py -> build/bdist.hp-ux-B.11.23-ia64/egg
/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/connections.py -> build/bdist.hp-ux-B.11.23-ia64/eg
g/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/cursors.py -> build/bdist.hp-ux-B.11.23-ia64/egg/My
SQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/release.py -> build/bdist.hp-ux-B.11.23-ia64/egg/My
SQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/times.py -> build/bdist.hp-ux-B.11.23-ia64/egg/MySQ
Ldb
creating build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/init.py -> build/bdist.hp-ux-B.11.23-
ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/CR.py -> build/bdist.hp-ux-B.11.23-ia64/e
gg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/FIELD_TYPE.py -> build/bdist.hp-ux-B.11.2
3-ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/ER.py -> build/bdist.hp-ux-B.11.23-ia64/e
gg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/FLAG.py -> build/bdist.hp-ux-B.11.23-ia64
/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/REFRESH.py -> build/bdist.hp-ux-B.11.23-i
a64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/CLIENT.py -> build/bdist.hp-ux-B.11.23-ia
64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/_mysql.so -> build/bdist.hp-ux-B.11.23-ia64/egg
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/_mysql_exceptions.py to _mysql_exceptions.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/init.py to init.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/converters.py to converters.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/connections.py to connections.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/times.py to times.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/init.py to init.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/ER.py to ER.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/FLAG.py to FLAG.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/REFRESH.py to REFRESH.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/CLIENT.py to CLIENT.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/_mysql.py to _mysql.pyc
creating build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
writing MySQL_python.egg-info/native_libs.txt
copying MySQL_python.egg-info/PKG-INFO -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/native_libs.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg' and adding 'build/bdist.hp-ux-B.11.2
3-ia64/egg' to it
removing 'build/bdist.hp-ux-B.11.23-ia64/egg' (and everything under it)
Processing setuptools-0.6c5-py2.4.egg
removing '/usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg' (and everything und
er it)
creating /usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg
Extracting setuptools-0.6c5-py2.4.egg to /usr/local/lib/hpux32/python/site-packages
setuptools 0.6c5 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/lib/bin
Installing easy_install-2.4 script to /usr/local/lib/bin
Installed /usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg
Processing dependencies for setuptools==0.6c5
Processing MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Removing /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Copying MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg to /usr/local/lib/hpux32/python/site-package
s
MySQL-python 1.2.2 is already the active version in easy-install.pth
Installed /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Processing dependencies for MySQL-python==1.2.2
Thanks,
Sun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is no MySQLdb.py; MySQLdb is a module, so it will be a directory containing init.py. But since it builds as a egg, you should be seeing /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg. egg files are really sort of .zip files. setuptools/easy_install makes this findable by python. Does your system have more than one version of python installed?
If you can also try installing like this if eggs aren't working for you:
the reason for --install-lib is that it complains the default install path not valid for .pth file or some error like that, though i tried some other install options, i can't tell the exact error since i am now at home and not with the machine..
but i finally found a workaround by copying build/lib..../MySQLdb/ and _mysql* to python directory.
yes, there is MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg, i don't have exp with python and .egg. So could you let me know how to use easy_install to uncompress/install this file? thanks!!
:)
Sun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oh, BTW, the error message metions "--insatll-dir" option, but 1.2.2 install help doesn't have this option now, so i guess it is obsolete and need to update.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
MySQLdb doesn't work when imporing in python, and there is no MySQLdb.py* in python dir.. Below is installation output, can anyone confirm if it successed ?
python setup.py install --install-lib /usr/local/lib/hpux32/python/site-packages/
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.hp-ux-B.11.23-ia64/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb
running build_ext
creating build/bdist.hp-ux-B.11.23-ia64/egg
copying build/lib.hp-ux-B.11.23-ia64-2.4/_mysql_exceptions.py -> build/bdist.hp-ux-B.11.23-ia64/egg
creating build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/init.py -> build/bdist.hp-ux-B.11.23-ia64/egg/M
ySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/converters.py -> build/bdist.hp-ux-B.11.23-ia64/egg
/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/connections.py -> build/bdist.hp-ux-B.11.23-ia64/eg
g/MySQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/cursors.py -> build/bdist.hp-ux-B.11.23-ia64/egg/My
SQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/release.py -> build/bdist.hp-ux-B.11.23-ia64/egg/My
SQLdb
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/times.py -> build/bdist.hp-ux-B.11.23-ia64/egg/MySQ
Ldb
creating build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/init.py -> build/bdist.hp-ux-B.11.23-
ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/CR.py -> build/bdist.hp-ux-B.11.23-ia64/e
gg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/FIELD_TYPE.py -> build/bdist.hp-ux-B.11.2
3-ia64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/ER.py -> build/bdist.hp-ux-B.11.23-ia64/e
gg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/FLAG.py -> build/bdist.hp-ux-B.11.23-ia64
/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/REFRESH.py -> build/bdist.hp-ux-B.11.23-i
a64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/MySQLdb/constants/CLIENT.py -> build/bdist.hp-ux-B.11.23-ia
64/egg/MySQLdb/constants
copying build/lib.hp-ux-B.11.23-ia64-2.4/_mysql.so -> build/bdist.hp-ux-B.11.23-ia64/egg
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/_mysql_exceptions.py to _mysql_exceptions.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/init.py to init.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/converters.py to converters.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/connections.py to connections.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/cursors.py to cursors.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/release.py to release.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/times.py to times.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/init.py to init.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/CR.py to CR.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/ER.py to ER.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/FLAG.py to FLAG.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/REFRESH.py to REFRESH.pyc
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/MySQLdb/constants/CLIENT.py to CLIENT.pyc
creating stub loader for _mysql.so
byte-compiling build/bdist.hp-ux-B.11.23-ia64/egg/_mysql.py to _mysql.pyc
creating build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
writing MySQL_python.egg-info/native_libs.txt
copying MySQL_python.egg-info/PKG-INFO -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/SOURCES.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/dependency_links.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/native_libs.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
copying MySQL_python.egg-info/top_level.txt -> build/bdist.hp-ux-B.11.23-ia64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg' and adding 'build/bdist.hp-ux-B.11.2
3-ia64/egg' to it
removing 'build/bdist.hp-ux-B.11.23-ia64/egg' (and everything under it)
Processing setuptools-0.6c5-py2.4.egg
removing '/usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg' (and everything und
er it)
creating /usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg
Extracting setuptools-0.6c5-py2.4.egg to /usr/local/lib/hpux32/python/site-packages
setuptools 0.6c5 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/lib/bin
Installing easy_install-2.4 script to /usr/local/lib/bin
Installed /usr/local/lib/hpux32/python/site-packages/setuptools-0.6c5-py2.4.egg
Processing dependencies for setuptools==0.6c5
Processing MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Removing /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Copying MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg to /usr/local/lib/hpux32/python/site-package
s
MySQL-python 1.2.2 is already the active version in easy-install.pth
Installed /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg
Processing dependencies for MySQL-python==1.2.2
Thanks,
Sun
There is no MySQLdb.py; MySQLdb is a module, so it will be a directory containing init.py. But since it builds as a egg, you should be seeing /usr/local/lib/hpux32/python/site-packages/MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg. egg files are really sort of .zip files. setuptools/easy_install makes this findable by python. Does your system have more than one version of python installed?
If you can also try installing like this if eggs aren't working for you:
python setup.py install --install-lib /usr/local/lib/hpux32/python/site-packages/ --old-and-unmanagable
Why are you using --install-lib anyway? You shouldn't have to do that.
Thanks for your reply, Andy!
the reason for --install-lib is that it complains the default install path not valid for .pth file or some error like that, though i tried some other install options, i can't tell the exact error since i am now at home and not with the machine..
but i finally found a workaround by copying build/lib..../MySQLdb/ and _mysql* to python directory.
yes, there is MySQL_python-1.2.2-py2.4-hp-ux-B.11.23-ia64.egg, i don't have exp with python and .egg. So could you let me know how to use easy_install to uncompress/install this file? thanks!!
:)
Sun
Setuptools documentation is here:
http://peak.telecommunity.com/DevCenter/setuptools
oh, BTW, the error message metions "--insatll-dir" option, but 1.2.2 install help doesn't have this option now, so i guess it is obsolete and need to update.