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