Seite 1 von 1

Portable Python3.2 und easy install

Verfasst: Donnerstag 2. April 2015, 13:26
von TrayserCassa
Guten Tag,

nach langer pause melde ich mich auch mal wieder mit einem kleinem Problem.
Ich habe ein Script geschrieben welches das Paket PyMySQL benutzt. Dies muss ich in der Schule ausführen. Das Problem besteht darin das wir in der Schule weder Rechte haben etwas zu installieren, noch python vorinstalliert haben. (Ich Programmier mit Python3)

Also dachte ich mir nutzte ich PythonPortable. Nun wollte ich das Paket PyMySQL installieren, (mit easy_install) doch es scheint so als würden da einiges an Fehler auftauchen.. Hier die Fehlermeldung:
C:\Users\Patrick>H:\Python32\App\python.exe H:\Python32\App\Scripts\easy_install
.py PyMySQL
Traceback (most recent call last):
File "H:\Python32\App\Scripts\easy_install.py", line 4, in <module>
from setuptools.command.easy_install import main
File "H:\Python32\App\lib\site-packages\setuptools\__init__.py", line 2, in <m
odule>
from setuptools.extension import Extension, Library
File "H:\Python32\App\lib\site-packages\setuptools\extension.py", line 5, in <
module>
from setuptools.dist import _get_unpatched
File "H:\Python32\App\lib\site-packages\setuptools\dist.py", line 5, in <modul
e>
from setuptools.depends import Require
File "H:\Python32\App\lib\site-packages\setuptools\depends.py", line 39
str(version)<>"unknown" and version >= self.requested_version
^
SyntaxError: invalid syntax
Ok komisch .. Jetzt bekomm ich die Meldung das python.exe keine Win-32 ist ..

Vielleicht kann mir ja jemand schon helfen, während ich neu installiere :(

MfG
Trayser

Re: Portable Python3.2 und easy install

Verfasst: Donnerstag 2. April 2015, 13:33
von Sirius3
@TrayserCassa: was ist denn das für ein Packet? "<>" sollte schon sehr sehr lange nicht mehr verwendet werden und in Python3 nicht mehr erlaubt.

Re: Portable Python3.2 und easy install

Verfasst: Donnerstag 2. April 2015, 14:31
von TrayserCassa
das Paket ist hier https://pypi.python.org/pypi/PyMySQL

und die version die ich benutzte ist Python 3.2.5.1 http://portablepython.com/

Auf meinem Laptop, wo ich das Paket mit pip installiert habe, läuft alles einwandfrei... Nur möchte ich das nun Portable machen. Zu einer Exe formatieren währe noch eine Idee, allerdings habe ich damit keine guten ehrfahrungen gemacht.

Edit:
Ich geh mal davon aus, dass das Modul "setuptools" nicht "geupdatet" wurde...

C:\Users\Patrick>H:\Python32\App\python.exe H:\Python32\PyMySQL-PyMySQL-7c86923\setup.py
Traceback (most recent call last):
File "H:\Python32\PyMySQL-PyMySQL-7c86923\setup.py", line 2, in <module>
from setuptools import setup, find_packages
File "H:\Python32\App\lib\site-packages\setuptools\__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "H:\Python32\App\lib\site-packages\setuptools\extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "H:\Python32\App\lib\site-packages\setuptools\dist.py", line 103
except ValueError, e:
^
SyntaxError: invalid syntax
Wie macht Ihr das denn, wenn ihr ein Script ausführen müsst und auf dem Zielrechner ist kein Python installiert und ihr habt externe module ... Oder kann ich einfach setuptools von meinem pc auf den Stick kopieren?


MfG
Trayser

Re: Portable Python3.2 und easy install

Verfasst: Montag 4. Mai 2015, 11:16
von Leonidas
PyMySQL ist halt nicht kompatibel mit Python 3, das hat mit setuptools jetzt nix zu tun.

Re: Portable Python3.2 und easy install

Verfasst: Montag 4. Mai 2015, 12:35
von BlackJack
@Leonidas: Die Ausnahme kommt aber von `setuptools`, da scheint der OP sich irgendwie eine nicht zur Python-Version passende Version von installiert zu haben.

Re: Portable Python3.2 und easy install

Verfasst: Montag 4. Mai 2015, 12:38
von Leonidas
Oh tatsächlich. Dann nehme ich alles zurück und behaupte das Gegenteil. Tatsächlich ist PyMySQL sogar mit Python 3 kompatibel (aber erst 3.3, nicht 3.2 was der OP hat).