Toon posts:

[Python]: probleem bij het maken van een .exe-file

Pagina: 1
Acties:
  • 122 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Sinds kort programmeer ik in Python (versie 2.3)

Nu heb ik Py2exe gedownload om een executable van mijn programma te maken, maar... ik krijg de volgende foutmelding:

ImportError: No module named disutils.core

Wat is hier aan de hand? :?

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Moet je niet gewoon distutils installeren?

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Verwijderd

Topicstarter
Hmmm... helpt !
Werkt nog niet helemaal, maar ik ben alweer een stapje verder in de goede richting !

Dank !


(PS: ik dacht dat disutils standaard in Python zat ?!?!)

Verwijderd

Topicstarter
Ehhh... ik dácht dat het hielp, maar ik heb nog steeds hetzelfde probleem.

Ik zal een exacte screendump van het gebeuren geven:

ActivePython 2.3.2 Build 230 (ActiveState Corp.) based on
Python 2.3.2 (#49, Oct 24 2003, 13:37:57) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> # setup.py
... from disutils.core import setup
Traceback (most recent call last):
File "<stdin>", line 2, in ?
ImportError: No module named disutils.core
>>> import py2exe
>>>
>>> setup(console=["myscript.py"])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'setup' is not defined
>>>

  • PommeFritz
  • Registratie: Augustus 2001
  • Laatst online: 24-11-2025

PommeFritz

...geen friet

Blijkbaar hebben ze bij ActiveState besloten om distutils niet in hun Python distributie te verpakken? Probeer gewoon de standaard Python 2.3.3 distributie van www.python.org. Bij mij werkt "import distutils.core" zonder problemen...

FireFox - neem het web in eigen hand


  • Soultaker
  • Registratie: September 2000
  • Laatst online: 26-05 23:14
distutils zitten zeker wel in ActivePython; het is dus niet noedig om een andere distributie te installeren. Is de distutils.core module zelf wel geladen, voordat je probeert er setup uit te halen?

[ Voor 7% gewijzigd door Soultaker op 02-04-2004 18:12 ]


  • Robtimus
  • Registratie: November 2002
  • Laatst online: 09:46

Robtimus

me Robtimus no like you

Ben ik de enige die de (waarschijnlijke) typo disutils (dus zonder t) van de TS ziet?

More than meets the eye
There is no I in TEAM... but there is ME
system specs


  • Soultaker
  • Registratie: September 2000
  • Laatst online: 26-05 23:14
Erm, ik had het inderdaad niet gezien. :o Dat zal het zijn.

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Nee, ik had het wel gezien; zie ook

http://mail.python.org/pi.../2002-January/080738.html

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


  • Robtimus
  • Registratie: November 2002
  • Laatst online: 09:46

Robtimus

me Robtimus no like you

Ik heb hier Python 2.3.3 (de standaard), en disutils.core importen lukt niet (krijg dezelfde fout); distutils.core wel. Oplossing lijkt me dus 1 t :P

More than meets the eye
There is no I in TEAM... but there is ME
system specs


  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

IceManX schreef op 03 april 2004 @ 00:02:
Ik heb hier Python 2.3.3 (de standaard), en disutils.core importen lukt niet (krijg dezelfde fout); distutils.core wel. Oplossing lijkt me dus 1 t :P
Zou die eikel persoon op de python mailinglist dan gewoon dezelfde spelfout gemaakt hebben? :(

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


  • Robtimus
  • Registratie: November 2002
  • Laatst online: 09:46

Robtimus

me Robtimus no like you

Lijkt me eerlijk gezegd wel het meest waarschijnlijk, aangezien ook de Python 2.2.3 op mijn school PC (Linux) wel distutils kent maar niet disutils.

En zeg nou zelf, als het pakket distutils heet, waarom zou het dan met disutils moeten worden geimport?

More than meets the eye
There is no I in TEAM... but there is ME
system specs


  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

IceManX schreef op 03 april 2004 @ 13:15:
Lijkt me eerlijk gezegd wel het meest waarschijnlijk, aangezien ook de Python 2.2.3 op mijn school PC (Linux) wel distutils kent maar niet disutils.

En zeg nou zelf, als het pakket distutils heet, waarom zou het dan met disutils moeten worden geimport?
Zie ik eruit alsof ik dat soort logica zou kunnen verzinnen? :P Waarschijnlijk heb je wel gelijk; en is de oplossing dus een simpele typefout herstellen :D

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Verwijderd

Topicstarter
KLopt klopt klopt helemaal !

Stomme typ-fout.

Nieuwe screendump:

ActivePython 2.3.2 Build 230 (ActiveState Corp.) based on
Python 2.3.2 (#49, Oct 24 2003, 13:37:57) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> # setup.py
... from distutils.core import setup
>>> import py2exe
>>>
>>> setup(console=["myscript.py"])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:\Python23\distutils\core.py", line 101, in setup
_setup_distribution = dist = klass(attrs)
File "c:\Python23\Lib\site-packages\py2exe\__init__.py", line 75, in __init__
distutils.dist.Distribution.__init__(self, attrs)
File "c:\Python23\distutils\dist.py", line 130, in __init__
setattr(self, method_name, getattr(self.metadata, method_name))
AttributeError: DistributionMetadata instance has no attribute 'get___doc__'
>>>


Dat lijkt al meer ergens op. Nou nog die attribute-error oplossen !
Pagina: 1