Ne, to nefunguje.<br>Prikladam tedy v priloze jeste seznam souboru ktere se mi v pythonu udelaly. Mam obavu ze to je v te slozce i ze ktere jsem to instaloval ovsem otazkou by pak bylo kam se to podelo.<br><br>Udelal jsem takovy experiment, nasel jsem v build slozku MySQLdb + soubor _mysql_exceptions.py tak sem to nakopcil do \lib a ted kdyz zkusim importovat tak mne to serve s necim jinym<br>
<br>Traceback (most recent call last):<br> File "C:\<string>", line 1, in <module><br> File "C:\Utils\python26\Lib\MySQLdb\__init__.py", line 19, in <module><br> import _mysql<br>
ImportError: No module named _mysql<br><br>coz hlasi ze na radce 19 toho souboru je import _mysql ktery ovsem nemam. exituje jen jako _mysql.c a jak ho prelozit teda nevim... <br><br><br><div class="gmail_quote">2009/1/12 Tomas Brabenec <span dir="ltr"><<a href="mailto:konference@brabenec.net">konference@brabenec.net</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Pozij toto:<br>
<br>
import _mysql<br>
<br>
funguje ?<br>
<br>
<br>
Tomas<br>
<br>
<br>
Dne 12.1.2009 15:07, Ondrej Beranek napsal(a):<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
No tak to sice odstranit ty chyby, nicmene to neprovedlo co melo nebot pokud zadam<br>
<br>
import MySQLdb<br>
<br>
tak dostanu hlaseni ze modul nezna. Cista instalace po uprave setup.py vypadala takto:<br>
<br>
Microsoft Windows XP [Verze 5.1.2600]<br>
(C) Copyright 1985-2001 Microsoft Corp.<br>
<br>
c:\Utils\python26\i>.\..\python.exe .\setup.py build<br>
<br>
---------------------------------------------------------------------------<br>
This script requires setuptools version 0.6c9 to run (even to display<br>
help). I will attempt to download it for you (from<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/</a>), but<br>
you may need to enable firewall access for this script first.<br>
I will start the download in 15 seconds.<br>
<br>
(Note: if this machine does not have network access, please obtain the file<br>
<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6</a><br>
.egg<br>
<br>
and place it in this directory before rerunning this script.)<br>
---------------------------------------------------------------------------<br>
Downloading <a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0</a>.<br>
6c9-py2.6.egg<br>
c:\Utils\python26\i\ez_setup.py:49: DeprecationWarning: the md5 module is deprec<br>
ated; use hashlib instead<br>
from md5 import md5<br>
running build<br>
running build_py<br>
creating build<br>
creating build\lib.win32-2.6<br>
copying _mysql_exceptions.py -> build\lib.win32-2.6<br>
creating build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\__init__.py -> build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\converters.py -> build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\connections.py -> build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\cursors.py -> build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\release.py -> build\lib.win32-2.6\MySQLdb<br>
copying MySQLdb\times.py -> build\lib.win32-2.6\MySQLdb<br>
creating build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\__init__.py -> build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\CR.py -> build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.6\MySQLdb\constants<br>
<br>
copying MySQLdb\constants\ER.py -> build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-2.6\MySQLdb\constants<br>
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.6\MySQLdb\constants<br>
running build_ext<br>
building '_mysql' extension<br>
error: None<br>
<br>
c:\Utils\python26\i>.\..\python.exe .\setup.py install<br>
running install<br>
running bdist_egg<br>
running egg_info<br>
writing MySQL_python.egg-info\PKG-INFO<br>
writing top-level names to MySQL_python.egg-info\top_level.txt<br>
writing dependency_links to MySQL_python.egg-info\dependency_links.txt<br>
deleting MySQL_python.egg-info\native_libs.txt<br>
reading manifest file 'MySQL_python.egg-info\SOURCES.txt'<br>
reading manifest template 'MANIFEST.in'<br>
writing manifest file 'MySQL_python.egg-info\SOURCES.txt'<br>
installing library code to build\bdist.win32\egg<br>
running install_lib<br>
running build_py<br>
copying MySQLdb\release.py -> build\lib.win32-2.6\MySQLdb<br>
running build_ext<br>
building '_mysql' extension<br>
error: None<br>
<br>
c:\Utils\python26\i><br>
<br>
<br>
<br>
<br>
<br></div></div>
2009/1/12 Tomas Brabenec <<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a> <mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>>><div>
<div></div><div class="Wj3C7c"><br>
<br>
Aha,<br>
<br>
tak v tom pripade jeste v souboru ez_setup.py pridej do slovniku<br>
md5_data spravny MD5 otisk pro 0.6c9-py2.6<br>
<br>
melo by to byt nejspis toto:<br>
<br>
'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',<br>
<br>
Ale radsi si to zkotroluj.<br>
<br>
Zdroj je tady: <a href="http://pypi.python.org/pypi/setuptools/0.6c9" target="_blank">http://pypi.python.org/pypi/setuptools/0.6c9</a><br>
<br>
Tomas<br>
<br>
<br>
Dne 12.1.2009 12:13, Ondrej Beranek napsal(a):<br>
<br>
jednoduse.<br>
<br>
Ukazi vam jak to instaluji je mozne ze to delam uplne spatne.<br>
Do slozky i jsem rozbalil presne to, na co jste mi poslal odkaz.<br>
<br>
<br>
Microsoft Windows XP [Verze 5.1.2600]<br>
(C) Copyright 1985-2001 Microsoft Corp.<br>
<br>
c:\Utils\python26\i>.\..\python.exe .\setup.py install<br>
<br>
---------------------------------------------------------------------------<br>
This script requires setuptools version 0.6c5 to run (even to<br>
display<br>
help). I will attempt to download it for you (from<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/</a>), but<br>
you may need to enable firewall access for this script first.<br>
I will start the download in 15 seconds.<br>
<br>
(Note: if this machine does not have network access, please<br>
obtain the file<br>
<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c5-py2.6" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c5-py2.6</a><br>
.egg<br>
<br>
and place it in this directory before rerunning this script.)<br>
---------------------------------------------------------------------------<br>
Downloading<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0</a>.<br>
6c5-py2.6.egg<br>
Traceback (most recent call last):<br>
File ".\setup.py", line 5, in <module><br>
import ez_setup; ez_setup.use_setuptools()<br>
File "c:\Utils\python26\i\ez_setup.py", line 83, in<br>
use_setuptools<br>
egg = download_setuptools(version, download_base, to_dir,<br>
download_delay)<br>
File "c:\Utils\python26\i\ez_setup.py", line 137, in<br>
download_setuptools<br>
src = urllib2.urlopen(url)<br>
File "c:\Utils\python26\lib\urllib2.py", line 124, in urlopen<br>
return _opener.open(url, data, timeout)<br>
File "c:\Utils\python26\lib\urllib2.py", line 389, in open<br>
response = meth(req, response)<br>
File "c:\Utils\python26\lib\urllib2.py", line 502, in<br>
http_response<br>
'http', request, response, code, msg, hdrs)<br>
File "c:\Utils\python26\lib\urllib2.py", line 421, in error<br>
result = self._call_chain(*args)<br>
File "c:\Utils\python26\lib\urllib2.py", line 361, in _call_chain<br>
result = func(*args)<br>
File "c:\Utils\python26\lib\urllib2.py", line 597, in<br>
http_error_302<br>
return self.parent.open(new)<br>
File "c:\Utils\python26\lib\urllib2.py", line 389, in open<br>
response = meth(req, response)<br>
File "c:\Utils\python26\lib\urllib2.py", line 502, in<br>
http_response<br>
'http', request, response, code, msg, hdrs)<br>
File "c:\Utils\python26\lib\urllib2.py", line 427, in error<br>
return self._call_chain(*args)<br>
File "c:\Utils\python26\lib\urllib2.py", line 361, in _call_chain<br>
result = func(*args)<br>
File "c:\Utils\python26\lib\urllib2.py", line 510, in<br>
http_error_default<br>
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)<br>
urllib2.HTTPError: HTTP Error 404: Not Found<br>
<br>
c:\Utils\python26\i><br>
<br>
Problemem je totiz to ze "<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c5-py2.6.egg" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/setuptools-0.6c5-py2.6.egg</a>"<br>
neexistuje v odkazovanem miste<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools</a> se<br>
totiz nachazi pouze setuptools-0.6c9-py2.6.egg<br>
<<a href="http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg" target="_blank">http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c9-py2.6.egg</a>><br>
tj. zkusil jsem tedy upravit v ez_setup.py promennou<br>
<br>
DEFAULT_VERSION z "0.6c5" na "0.6c9" coz ovsem prinasi jiz<br>
zminene stiznosti na zastaralost knihovny md5 a memu zaveru ze<br>
cesta vetsiho upravovani zdrojaku<br>
neni spravna.<br>
<br>
Ja netvrdim (a vlastne si to ani nemyslim) ze to delam dobre<br>
ale jina cesta mne nenapada...<br>
<br>
<br>
<br>
Dne 12. leden 2009 11:33 Tomas Brabenec<br>
<<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a> <mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>><br></div></div><div><div>
</div><div class="Wj3C7c">
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a><br>
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>>>> napsal(a):<br>
<br>
<br>
Ja nejak nerozumim, jak setuptools souvisi s pouzitim MySQLdb.<br>
Pokud bys instalovat MySQLdb pomoci easy_inastall z egg tak<br>
tomu<br>
rozumim, ale pokud si stahnes rucne zdrojaky tak easy_install<br>
nepotrebujes.<br>
<br>
Co to dela, kdyz stahnes a pouzijes toto:<br>
<a href="http://internap.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz" target="_blank">http://internap.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz</a><br>
<br>
Tomas<br>
<br>
<br>
Dne 12.1.2009 10:30, Ondrej Beranek napsal(a):<br>
<br>
Ano, trable ktere jsem popisoval byly primo s temito<br>
zdrojaky.<br>
<br>
Dne 12. leden 2009 7:19 Tomas Brabenec<br>
<<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a> <mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>><br>
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a> <mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>>><br>
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a> <mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>><br>
<br>
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a><br>
<mailto:<a href="mailto:konference@brabenec.net" target="_blank">konference@brabenec.net</a>>>>> napsal(a):<br>
<br>
<br>
A zkousel jsi stahnout primo zdrojaky?<br>
<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a>><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a>>><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a>><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a><br>
<<a href="http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=491012</a>>>><br>
<br>
Ty taky nefunguji ?<br>
<br>
Tomas<br>
<br>
Dne 11.1.2009 16:02, Ondrej Beranek napsal(a):<br>
<br>
no to je mozne. ale na strankach projektu je<br>
maximalne pro<br>
py2.5 a soucast pythonu 2.6 neni... zkousel jsem<br>
to i pres<br>
source ale tam to skoncilo na tom ze se to pokouselo<br>
stahnout<br>
jakysi egg soubor setuptools ve verzi "0.6c5" ktera<br>
ale v v<br>
repozitari neni takze jsem zkusil stahnout<br>
setuptools-0.6c9-py2.6.egg ktery jediny v tom<br>
repozitari<br>
<a href="http://cheeseshop.python.org/packages/2.6/s/setuptools/" target="_blank">http://cheeseshop.python.org/packages/2.6/s/setuptools/</a> byl,<br>
upravil ez_setup, ovsem pak se to slozilo na tom<br>
ze to<br>
pouziva<br>
zastaranou knihovnu md5... takze jsem usoudil ze<br>
tudy cesta<br>
nepovede.<br>
Jsem silne zmaten.<br>
<br>
<br>
<br>
Dne 11. leden 2009 14:49 <<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>>>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>>><br>
<br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a> <mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a><br>
<mailto:<a href="mailto:Calis.martin@seznam.cz" target="_blank">Calis.martin@seznam.cz</a>>>>>> napsal(a):<br>
<br>
<br>
No nevím, já myslel že MySQLdb jede i na<br>
Py3000...<br>
<br>
> ------------ Původní zpráva ------------<br>
> Od: Ondrej Beranek <<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>>><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>>>><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>>><br>
<br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>><br>
<mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a> <mailto:<a href="mailto:rainbof@gmail.com" target="_blank">rainbof@gmail.com</a>>>>>><br>
<br>
<br>
> Předmět: [python] Mysql<br>
> Datum: 11.1.2009 12:10:31<br>
> ----------------------------------------<br>
> Ahoj,<br>
><br>
> presel jsem na python 2.6 nyni se snazim udelat aplikaci ktera<br>
neco vybere z<br>
> databaze a pak s tim pracuje. No problem je v tom ze nemohu<br>
nejak najit nic<br>
> co by pod pythonem 2.6 pro databazovy pristup fungovalo. Libilo<br>
by se mi<br>
> MySQLdb ale to podle vseho jde jen na pythonu 2.5... (normalne<br>
bych se<br>
> zeptal na programujte com ale ten od ctvrtka nejde)<br>
><br>
><br>
><br>
<br>
<br>
</div></div></blockquote><div><div></div><div class="Wj3C7c">
_______________________________________________<br>
Python mailing list<br>
<a href="mailto:Python@py.cz" target="_blank">Python@py.cz</a><br>
</div></div><div><div></div><div class="Wj3C7c"><a href="http://www.py.cz/mailman/listinfo/python" target="_blank">http://www.py.cz/mailman/listinfo/python</a><br>
</div></div></blockquote></div><br>