View previous topic :: View next topic |
Author |
Message |
Simonheld Apprentice
Joined: 20 Nov 2005 Posts: 151 Location: Deepest Black Bavaria
|
Posted: Thu Jun 06, 2013 11:30 am Post subject: [solved] Problem mit python paket |
|
|
Hallo,
ich benutze das python Paket "dev-python/pyx" zum erstellen von Grafiken. Seit meiner kürtlichen Neuinstallation. Wird das paket von python nicht mehr gefunden.
Code: |
Traceback (most recent call last):
File "TablesNoExzitons.py", line 4, in <module>
from pyx import *
ImportError: No module named pyx
|
Das Paket ist allerdings installiert.
Code: |
* dev-python/pyx
Latest version available: 0.12.1-r1
Latest version installed: 0.12.1-r1
Size of files: 548 kB
Homepage: http://pyx.sourceforge.net/
Description: Python package for the generation of encapsulated PostScript figures
License: GPL-2
|
Ein Blick in /usr/lib/python3.2/site-packages/ zeigt allerdings, dass das Paket nur in /usr/lib/python2.7/site-packages/ zu finden ist.
Warum finde ich das nicht in python3.2 ? Wie kann ich das beheben ?
Vielen Dank,
Simon
Last edited by Simonheld on Thu Jun 06, 2013 1:49 pm; edited 1 time in total |
|
Back to top |
|
|
Simonheld Apprentice
Joined: 20 Nov 2005 Posts: 151 Location: Deepest Black Bavaria
|
Posted: Thu Jun 06, 2013 12:28 pm Post subject: |
|
|
Habe "python-updater" ausgeführt, der hat 13 Pakete neuinstalliert, unter anderem "pyx" aber gebrachte hat es nichts ... |
|
Back to top |
|
|
Simonheld Apprentice
Joined: 20 Nov 2005 Posts: 151 Location: Deepest Black Bavaria
|
Posted: Thu Jun 06, 2013 12:43 pm Post subject: |
|
|
Weiß nicht obs irgendwas hilft:
Wenn ich vor der import-Anweisung
Code: | sys.path.insert(0, "/usr/lib/python2.7/site-packages/")
|
einfüge, kommt ein Fehler
Code: | Traceback (most recent call last):
File "TablesNoExzitons.py", line 5, in <module>
from pyx import *
File "/usr/lib/python2.7/site-packages/pyx/__init__.py", line 32, in <module>
import version
ImportError: No module named version
|
Inhalt der Datei /usr/lib/python2.7/site-packages/pyx/__init__.py :
Code: | import version
__version__ = version.version
__all__ = ["attr", "box", "bitmap", "canvas", "color", "connector", "deco", "deformer", "document",
"epsfile", "graph", "mesh", "metapost", "path", "pattern", "pdfextra", "style", "trafo", "text", "unit"]
# automatically import main modules into pyx namespace
for module in __all__:
__import__(module, globals(), locals(), [])
|
|
|
Back to top |
|
|
Simonheld Apprentice
Joined: 20 Nov 2005 Posts: 151 Location: Deepest Black Bavaria
|
Posted: Thu Jun 06, 2013 1:49 pm Post subject: |
|
|
Ok ich habe wieder etwas gelernt:
Wenn ich das Script mit
statt mit
ausführe funktioniert es problemlos. Das beantwortet zwar nicht wirklich meine Frage aber es beseitigt mein Problem. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|